/* ==========================================================================
   半岛体育主站 · 共享样式 /assets/site.css
   赛场经纬：1px 轨道 + 画册留白 + 信号橙定位
   ========================================================================== */

/* 1 · Reset ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

html:focus-within { scroll-behavior: smooth; }

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, blockquote, dl, dd, fieldset { margin: 0; }

ul[class], ol[class] { list-style: none; padding: 0; }

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }

button { font: inherit; color: inherit; }

a { color: inherit; }

[hidden] { display: none !important; }

/* 2 · Tokens --------------------------------------------------------------- */
:root {
  --ink-900: #060B18;
  --ink-800: #0B1428;
  --navy-600: #1B3358;
  --line: #2A3F63;
  --paper: #F4F1EA;
  --paper-2: #E7E2D6;
  --signal: #FF6A13;
  --signal-soft: #FFB37A;
  --pitch: #2F7A54;
  --ice: #7FB2D9;
  --warm: #F2C14E;
  --text-on-dark: #EAF0F8;
  --muted: #8D9BB3;
  --ink-text: #0D1526;
  --ink-text-2: #4A5568;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system,
    "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
    "Courier New", monospace;

  --wrap: 1340px;
  --pad: clamp(16px, 4vw, 48px);
  --header-h: 74px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --radius-soft: 2px 22px 2px 22px;
}

/* 3 · Base typography ------------------------------------------------------ */
body {
  background-color: var(--paper);
  color: var(--ink-text);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.85;
  font-weight: 400;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -.03em;
  text-wrap: balance;
}

h1, .display {
  font-size: clamp(34px, 5.6vw, 68px);
  line-height: 1.04;
  letter-spacing: -.038em;
  margin-bottom: .55em;
}

h2, .h2 {
  font-size: clamp(26px, 3.4vw, 44px);
  letter-spacing: -.032em;
  margin-bottom: .5em;
}

h3, .h3 {
  font-size: clamp(19px, 2.1vw, 27px);
  letter-spacing: -.02em;
  margin-bottom: .45em;
}

p { max-width: 34em; }

strong { font-weight: 700; }

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

.muted { color: var(--muted); }

.prose > * + * { margin-top: 1.15em; }
.prose p { max-width: 34em; }

.lede {
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.72;
  max-width: 30em;
  letter-spacing: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 18px;
}

.eyebrow::before {
  content: "";
  width: 14px;
  height: 1px;
  background-color: currentColor;
  flex: 0 0 auto;
}

.note {
  font-size: 13px;
  line-height: 1.78;
  color: var(--muted);
  border-left: 2px solid var(--signal);
  padding-left: 14px;
  max-width: 30em;
}

.rule {
  height: 1px;
  background-color: var(--line);
  border: 0;
  margin: 0;
  opacity: .65;
}

/* 4 · Layout --------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(48px, 8vw, 118px); }

.section--ink {
  background-color: var(--ink-900);
  color: var(--text-on-dark);
}

.section--navy {
  background-color: var(--ink-800);
  color: var(--text-on-dark);
}

.section--paper-2 { background-color: var(--paper-2); }

.section--ink .note,
.section--navy .note { color: var(--muted); }

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

.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-5 { grid-column: span 5; }
.span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; }
.span-8 { grid-column: span 8; }
.span-9 { grid-column: span 9; }
.span-12 { grid-column: span 12; }

#main-content { display: block; }
#main-content:focus { outline: none; }

/* 5 · Buttons & small parts ------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease),
    border-color .18s var(--ease), transform .18s var(--ease);
}

.btn--signal {
  background-color: var(--signal);
  color: var(--ink-900);
}

.btn--signal:hover {
  background-color: var(--signal-soft);
  transform: translateY(-1px);
}

.btn--outline {
  border-color: var(--line);
  color: inherit;
  background-color: transparent;
}

.btn--outline:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.btn--quiet {
  padding-inline: 4px;
  min-height: 40px;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--signal);
}

.btn--quiet:hover { color: var(--signal); }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .1em;
  color: var(--muted);
}

.breadcrumb li { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumb li:not(:last-child)::after {
  content: "/";
  color: var(--line);
  letter-spacing: 0;
}

.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { color: var(--signal); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--muted);
  white-space: nowrap;
}

.tag--signal { color: var(--signal); }

/* 6 · Segmented control (外观层，交互见 site.js) ---------------------------- */
.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background-color: var(--ink-800);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.segmented__tab {
  appearance: none;
  border: 0;
  background-color: transparent;
  border-radius: 999px;
  padding: 8px 18px;
  min-height: 40px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}

.segmented__tab:hover { color: var(--text-on-dark); }

.segmented__tab[aria-selected="true"] {
  background-color: var(--signal);
  color: var(--ink-900);
}

/* 7 · Image frame base（供页面阶段放置图片） ------------------------------- */
.figure { margin: 0; }

.figure__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--navy-600);
  border-radius: var(--radius-soft);
}

.figure__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(234, 240, 248, .14) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(234, 240, 248, .14) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: .55;
}

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

.figure__cap {
  margin-top: 10px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 40em;
}

.figure--wide .figure__frame { aspect-ratio: 21 / 9; }
.figure--tall .figure__frame { aspect-ratio: 3 / 4; }

.figure--empty .figure__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(127, 178, 217, .1) 0 2px, transparent 2px 14px);
}

/* 8 · Skip link ------------------------------------------------------------ */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 400;
  transform: translateY(-160%);
  background-color: var(--signal);
  color: var(--ink-900);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .16s var(--ease);
}

.skip-link:focus-visible,
.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--paper);
  outline-offset: 2px;
}

/* 9 · Header · 框架式轨道 --------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(6, 11, 24, .94);
  border-bottom: 1px solid var(--line);
}

@supports (backdrop-filter: blur(6px)) {
  .site-header { backdrop-filter: blur(10px); }
}

/* 展开态的压暗层 */
.site-header::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  background-color: rgba(6, 11, 24, .72);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s var(--ease);
}

/* 轨道下缘的坐标刻度 */
.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 5px;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    var(--line) 0 1px,
    transparent 1px 14px
  );
  opacity: .5;
}

.header-inner {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.6vw, 40px);
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
  height: var(--header-h);
  transition: height .2s var(--ease);
}

.site-header[data-scrolled="true"] .header-inner { height: 56px; }

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--text-on-dark);
}

.brand__mark {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 106, 19, .85);
  flex: 0 0 auto;
}

.brand__mark i {
  position: absolute;
  background-color: var(--signal);
  opacity: .8;
}

.brand__mark i:first-child {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  transform: translateX(-.5px);
}

.brand__mark i:last-child {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  transform: translateY(-.5px);
}

.brand__word {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.012em;
  line-height: 1;
  white-space: nowrap;
}

.brand__coord {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--muted);
  line-height: 1;
  white-space: nowrap;
}

/* Nav */
.primary-nav { display: flex; }

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.9vw, 30px);
  margin: 0;
  padding: 0;
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 2px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1.2;
  color: rgba(234, 240, 248, .76);
  text-decoration: none;
  transition: color .16s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background-color: var(--signal);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .18s var(--ease), opacity .18s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible { color: #FFFFFF; }

.nav-link:hover::after { transform: scaleX(1); opacity: .45; }

.nav-link[aria-current="page"] { color: #FFFFFF; font-weight: 700; }
.nav-link[aria-current="page"]::after { transform: scaleX(1); opacity: 1; }

.nav-index {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .08em;
  color: var(--muted);
  transition: color .16s var(--ease);
}

.nav-link:hover .nav-index { color: var(--signal-soft); }
.nav-link[aria-current="page"] .nav-index { color: var(--signal); }

/* Header CTA */
.header-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-on-dark);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .18s var(--ease), color .18s var(--ease),
    border-color .18s var(--ease);
}

.header-cta:hover {
  background-color: var(--signal);
  border-color: var(--signal);
  color: var(--ink-900);
}

.header-cta__arrow { font-size: 12px; line-height: 1; }

/* Mobile toggle（桌面隐藏） */
.nav-toggle { display: none; }

/* 10 · Footer -------------------------------------------------------------- */
.site-footer {
  position: relative;
  background-color: var(--ink-900);
  color: var(--text-on-dark);
  border-top: 1px solid var(--line);
  padding-top: clamp(48px, 7vw, 96px);
}

.footer-inner {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.footer-head {
  display: grid;
  gap: clamp(20px, 3vw, 34px);
  padding-bottom: clamp(28px, 4vw, 46px);
  border-bottom: 1px solid rgba(42, 63, 99, .6);
}

.footer-statement {
  max-width: none;
  font-size: clamp(30px, 6vw, 64px);
  font-weight: 900;
  line-height: 1.04;
  letter-spacing: -.038em;
  color: #FFFFFF;
}

.footer-statement__accent {
  display: block;
  color: var(--signal);
}

.footer-scale {
  height: 12px;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(42, 63, 99, .95) 0 1px,
    transparent 1px 18px
  );
  border-bottom: 1px solid rgba(42, 63, 99, .6);
  opacity: .85;
}

.footer-cols {
  display: grid;
  grid-template-columns: 1.1fr .8fr 1.5fr;
  gap: clamp(24px, 4vw, 64px);
  padding-block: clamp(28px, 4vw, 52px);
  border-bottom: 1px solid rgba(42, 63, 99, .6);
}

.footer-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .16em;
  color: var(--muted);
  margin-bottom: 16px;
}

.footer-title::before {
  content: "";
  width: 14px;
  height: 1px;
  background-color: var(--signal);
  flex: 0 0 auto;
}

.footer-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-link {
  display: inline-block;
  font-size: 15px;
  color: rgba(234, 240, 248, .78);
  text-decoration: none;
  transition: color .15s var(--ease), transform .12s var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--signal-soft);
  transform: translateX(4px);
}

.contact-list {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-item { display: grid; gap: 2px; }

.contact-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--muted);
}

.contact-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-on-dark);
  word-break: break-word;
}

.contact-value--text {
  font-family: var(--font-sans);
  font-size: 14.5px;
  line-height: 1.75;
  letter-spacing: .01em;
  max-width: 26em;
}

.contact-note {
  margin-top: 16px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 30em;
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-block: 20px 30px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
}

.footer-base__item { line-height: 1.6; }

/* 11 · Scroll progress + reveal -------------------------------------------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 300;
  pointer-events: none;
  background-color: rgba(42, 63, 99, .35);
}

.progress__bar {
  display: block;
  width: 100%;
  height: 100%;
  background-color: var(--signal);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

[data-reveal].reveal-init {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}

[data-reveal].reveal-init.is-visible {
  opacity: 1;
  transform: none;
}

/* 12 · Focus --------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 2px;
}

.section--ink :focus-visible,
.section--navy :focus-visible,
.site-footer :focus-visible,
.site-header :focus-visible {
  outline-color: var(--signal-soft);
}

/* 13 · Responsive ---------------------------------------------------------- */
@media (max-width: 1180px) {
  .brand__coord { display: none; }
  .nav-list { gap: 14px; }
  .nav-link { font-size: 14px; }
}

@media (max-width: 1024px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-col--contact { grid-column: span 2; }
}

@media (max-width: 900px) {
  :root { --header-h: 58px; }

  .header-inner {
    height: 58px;
    gap: 12px;
    padding-inline: 16px;
  }

  .site-header[data-scrolled="true"] .header-inner { height: 54px; }

  .brand__word { font-size: 17px; }

  .header-cta {
    padding: 7px 13px;
    font-size: 12px;
    gap: 5px;
    min-height: 36px;
  }

  /* 底部三段式标签栏 + 更多抽屉 */
  .site-header { position: sticky; }

  .nav-list {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 92;
    width: calc(100% - 78px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    background-color: var(--ink-900);
    border-top: 1px solid var(--line);
  }

  .nav-item { display: none; }
  .nav-item:nth-child(-n + 3) { display: block; }

  .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 58px;
    padding: 0;
    font-size: 13px;
  }

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

  .nav-index { font-size: 9px; }

  .nav-toggle {
    position: fixed;
    right: 0;
    bottom: 0;
    z-index: 93;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 78px;
    height: 58px;
    padding: 0;
    border: 0;
    border-left: 1px solid var(--line);
    border-radius: 0;
    background-color: var(--ink-800);
    color: var(--text-on-dark);
    font-size: 11.5px;
    letter-spacing: .1em;
    cursor: pointer;
  }

  .nav-toggle__bars {
    display: grid;
    gap: 4px;
    width: 17px;
  }

  .nav-toggle__bars i {
    display: block;
    height: 1px;
    background-color: currentColor;
  }

  /* 展开态 */
  .site-header[data-open="true"]::before {
    opacity: 1;
  }

  .site-header[data-open="true"] .nav-list {
    top: auto;
    bottom: 56px;
    width: 100%;
    grid-template-columns: 1fr;
    max-height: min(68vh, 520px);
    overflow-y: auto;
    padding: 6px 0;
    background-color: var(--ink-800);
    border-top: 1px solid var(--line);
    box-shadow: 0 -18px 40px rgba(6, 11, 24, .6);
  }

  .site-header[data-open="true"] .nav-item { display: block; }

  .site-header[data-open="true"] .nav-link {
    justify-content: flex-start;
    height: auto;
    padding: 15px 24px;
    gap: 12px;
    font-size: 16px;
    border-bottom: 1px solid rgba(42, 63, 99, .45);
  }

  .site-header[data-open="true"] .nav-item:last-child .nav-link { border-bottom: 0; }

  .site-header[data-open="true"] .nav-toggle {
    left: 0;
    width: 100%;
    height: 56px;
    flex-direction: row;
    gap: 10px;
    border-left: 0;
    border-top: 1px solid var(--line);
    background-color: var(--ink-900);
    font-size: 12.5px;
  }

  .site-header[data-open="true"] .nav-toggle__bars i:last-child {
    transform: rotate(45deg) translateY(-2px);
  }

  .site-header[data-open="true"] .nav-toggle__bars i:first-child {
    transform: rotate(-45deg) translateY(2px);
  }

  body { padding-bottom: 58px; }

  .span-3, .span-4, .span-5, .span-6,
  .span-7, .span-8, .span-9 { grid-column: span 12; }

  .footer-cols { grid-template-columns: 1fr; }
  .footer-col--contact { grid-column: auto; }
  .footer-base { font-size: 11px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; line-height: 1.8; }
  .header-cta { font-size: 11.5px; padding: 6px 11px; }
  .brand { gap: 8px; }
  .brand__mark { width: 18px; height: 18px; }
  .footer-statement { letter-spacing: -.03em; }
  .figure__frame { border-radius: 2px 16px 2px 16px; }
}

/* 14 · Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }

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

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

  .footer-link:hover,
  .footer-link:focus-visible,
  .btn--signal:hover { transform: none; }
}
