/* ============================================================
   杏运体育看台 · 共享外壳样式 /assets/site.css
   1 Reset  2 Tokens  3 Typography  4 Header  5 Footer
   6 Buttons  7 Layout & Base components  8 Responsive
   ============================================================ */

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

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-underline-offset: 3px; }

:target { scroll-margin-top: calc(var(--header-h) + 20px); }

/* ---------- 2. Tokens ---------- */
:root {
  /* palette */
  --ink: #0E3B2E;
  --ink-deep: #08251C;
  --signal: #F2A900;
  --amber: #FFC24A;
  --concrete: #8A8F8C;
  --line: #C9CDCA;
  --paper: #F5F1E8;
  --white: #FFFFFF;
  --wine: #7A1F2B;
  --indigo: #3A2B6B;
  --navy: #16344F;
  --grass: #1F6B4A;

  /* type */
  --font-sans: "PingFang SC", "Source Han Sans SC", "Noto Sans SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "Roboto Mono", "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;

  /* metrics */
  --header-h: 96px;
  --header-h-stuck: 68px;
  --rail-w: 248px;
  --shell-w: 1440px;
  --gutter: 32px;
  --radius: 3px;

  /* effects */
  --hair: 1px solid var(--line);
  --shadow-hair: 0 1px 0 rgba(14, 59, 46, .08);
}

/* ---------- 3. Typography & focus ---------- */
:where(a, button, [tabindex], summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--ink);
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: 10px;
  z-index: 999;
  padding: 10px 18px;
  background: var(--signal);
  color: var(--ink-deep);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 2px;
  transform: translateY(-200%);
  transition: transform .18s ease;
}

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

.mono { font-family: var(--font-mono); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  color: var(--paper);
  background: rgba(8, 37, 28, .48);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid rgba(245, 241, 232, .16);
  transition: background-color .28s ease, border-color .28s ease, box-shadow .28s ease;
}

.site-header.is-stuck {
  background: var(--ink-deep);
  border-bottom-color: rgba(242, 169, 0, .38);
  box-shadow: 0 14px 28px -22px rgba(0, 0, 0, .95);
}

.site-progress {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  overflow: hidden;
  background: rgba(245, 241, 232, .16);
  pointer-events: none;
}

.site-progress-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--signal);
  transition: width .08s linear;
}

.site-header.is-stuck .site-progress-fill { background: var(--amber); }

.header-inner {
  width: 100%;
  max-width: var(--shell-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 18px;
  transition: min-height .28s ease;
}

.site-header.is-stuck .header-inner { min-height: var(--header-h-stuck); }

/* brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  padding: 6px 0;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--signal);
  clip-path: polygon(0 0, 100% 0, 100% 74%, 74% 100%, 0 100%);
}

.brand-mark::before {
  content: "";
  width: 12px;
  height: 12px;
  background: var(--ink-deep);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.brand-text { display: grid; gap: 2px; }

.brand-name {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .01em;
}

.brand-line {
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: .06em;
  color: rgba(245, 241, 232, .62);
}

/* status chip */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 11px;
  flex: 0 0 auto;
  font-size: 12px;
  letter-spacing: .04em;
  white-space: nowrap;
  color: var(--amber);
  background: rgba(242, 169, 0, .1);
  border: 1px solid rgba(242, 169, 0, .4);
  border-radius: 2px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  animation: status-breathe 2.4s ease-in-out infinite;
}

@keyframes status-breathe {
  0%, 100% { opacity: .32; }
  50% { opacity: 1; }
}

/* nav */
.site-nav { margin-left: auto; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-list a {
  display: block;
  padding: 9px 11px;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  color: rgba(245, 241, 232, .76);
  border-bottom: 2px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.nav-list a:hover {
  color: var(--paper);
  border-bottom-color: rgba(242, 169, 0, .55);
}

.nav-list a[aria-current="page"] {
  color: var(--signal);
  border-bottom-color: var(--signal);
}

/* toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  flex: 0 0 auto;
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(245, 241, 232, .3);
  border-radius: 2px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}

.nav-toggle:hover { color: var(--signal); border-color: var(--signal); }

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

.nav-toggle-bars i {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .22s ease, opacity .22s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-toggle-label { letter-spacing: .04em; }

/* ---------- 5. Footer ---------- */
.site-footer {
  position: relative;
  background: var(--ink-deep);
  color: rgba(245, 241, 232, .8);
  padding-bottom: 34px;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--signal) 0%, var(--signal) 26%, var(--wine) 26%, var(--wine) 46%, transparent 46%);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 34%);
}

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

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, .7fr) minmax(0, .7fr) minmax(0, 1.35fr);
  gap: 44px 40px;
  padding-bottom: 52px;
  border-bottom: 1px solid rgba(245, 241, 232, .12);
}

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

.footer-brand-name {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .01em;
  color: var(--paper);
  text-decoration: none;
}

.footer-brand-name .brand-mark { width: 28px; height: 28px; }
.footer-brand-name .brand-mark::before { width: 10px; height: 10px; }

.footer-intro {
  margin-top: 18px;
  max-width: 42ch;
  font-size: 14px;
  line-height: 1.85;
  color: rgba(245, 241, 232, .64);
}

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

.footer-title {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 0 0 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--amber);
}

.footer-title-num {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .1em;
  color: rgba(242, 169, 0, .55);
}

.footer-links {
  list-style: none;
  display: grid;
  gap: 11px;
}

.footer-links a {
  font-size: 15px;
  color: rgba(245, 241, 232, .78);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.footer-links a:hover {
  color: var(--signal);
  border-bottom-color: rgba(242, 169, 0, .6);
}

.footer-contact {
  font-style: normal;
  display: grid;
  gap: 12px;
  font-size: 14px;
  line-height: 1.7;
}

.footer-contact-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.footer-contact-label {
  flex: none;
  min-width: 44px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--concrete);
}

.footer-contact-value {
  color: rgba(245, 241, 232, .9);
  overflow-wrap: anywhere;
}

.footer-note {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.8;
  color: rgba(245, 241, 232, .48);
}

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 26px;
  padding-top: 22px;
  font-size: 12.5px;
  color: rgba(245, 241, 232, .52);
}

.footer-copy,
.footer-icp { margin: 0; }

.footer-icp { font-family: var(--font-mono); letter-spacing: .04em; }

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  list-style: none;
  margin-left: auto;
}

.footer-legal-links a {
  color: rgba(245, 241, 232, .7);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 241, 232, .2);
  transition: color .2s ease, border-color .2s ease;
}

.footer-legal-links a:hover {
  color: var(--signal);
  border-bottom-color: var(--signal);
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

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

.btn-signal:hover {
  background: var(--amber);
  border-color: var(--amber);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn-onDark {
  background: transparent;
  border-color: rgba(245, 241, 232, .35);
  color: var(--paper);
}

.btn-onDark:hover {
  border-color: var(--signal);
  color: var(--signal);
  transform: translateY(-2px);
}

.header-cta {
  flex: 0 0 auto;
  padding: 11px 18px;
  font-size: 14px;
}

/* ---------- 7. Layout & base components ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.shell--narrow { max-width: 880px; }

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.75;
}

.prose > * + * { margin-top: 1.1em; }

.prose h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -.01em;
  margin-top: 2em;
}

.prose h3 {
  font-size: 20px;
  font-weight: 700;
  margin-top: 1.6em;
}

.prose ul,
.prose ol { padding-left: 1.4em; }

.prose li + li { margin-top: .45em; }

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--signal);
  text-decoration-thickness: 2px;
}

.prose a:hover { text-decoration-color: var(--ink); }

/* breadcrumb */
.breadcrumb { padding-top: 22px; }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--concrete);
}

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

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

.breadcrumb-list a {
  color: var(--concrete);
  text-decoration: none;
  transition: color .2s ease;
}

.breadcrumb-list a:hover { color: var(--ink); }

.breadcrumb-list [aria-current="page"] {
  color: var(--ink);
  font-weight: 700;
}

.breadcrumb--onDark .breadcrumb-list,
.breadcrumb--onDark .breadcrumb-list a { color: rgba(245, 241, 232, .6); }
.breadcrumb--onDark .breadcrumb-list a:hover,
.breadcrumb--onDark .breadcrumb-list [aria-current="page"] { color: var(--paper); }
.breadcrumb--onDark .breadcrumb-list li + li::before { color: rgba(245, 241, 232, .3); }

/* grids */
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
}

.split-rail {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  align-items: start;
}

/* section index */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  flex-wrap: wrap;
}

.index-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(40px, 6vw, 96px);
  line-height: .82;
  letter-spacing: -.04em;
  color: transparent;
  -webkit-text-stroke: 1px var(--line);
  transition: color .24s ease, -webkit-text-stroke-color .24s ease;
}

.index-num.is-active {
  color: var(--signal);
  -webkit-text-stroke-color: var(--signal);
}

@supports not (-webkit-text-stroke: 1px red) {
  .index-num { color: var(--line); }
  .index-num.is-active { color: var(--signal); }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--concrete);
}

.eyebrow::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--signal);
}

/* numerals */
.num {
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.num--cost {
  display: block;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1;
  color: var(--signal);
}

.num--round {
  display: block;
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
}

/* media frames */
.frame-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--ink);
  border: 1px solid var(--line);
  border-radius: 2px;
}

.frame-media > img,
.frame-media > picture,
.frame-media > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.9) contrast(1.05) brightness(.94);
}

.frame-media--slant { clip-path: polygon(0 0, 100% 0, 100% 92%, 92% 100%, 0 100%); }
.frame-media--tall { aspect-ratio: 3 / 4; }
.frame-media--wide { aspect-ratio: 21 / 9; }
.frame-media--square { aspect-ratio: 1 / 1; }

.frame-media--empty::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(135deg, rgba(245, 241, 232, .07) 0 1px, transparent 1px 12px),
    var(--navy);
}

/* corner ticks */
.corners { position: relative; }

.corners::before,
.corners::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 1px solid var(--signal);
  pointer-events: none;
}

.corners::before {
  top: 0;
  left: 0;
  border-right: 0;
  border-bottom: 0;
}

.corners::after {
  right: 0;
  bottom: 0;
  border-left: 0;
  border-top: 0;
}

/* cards */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-hair);
  transition: transform .2s ease, border-color .2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 59, 46, .28);
}

.card--dark {
  background: var(--ink);
  border-color: rgba(245, 241, 232, .14);
  color: rgba(245, 241, 232, .86);
}

/* tabs */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--line);
}

.tab {
  appearance: none;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--concrete);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}

.tab:hover { color: var(--ink); }

.tab[aria-selected="true"] {
  color: var(--ink);
  border-bottom-color: var(--signal);
}

.tab-panel[hidden] { display: none; }

/* ---------- 8. Responsive ---------- */
@media (max-width: 1180px) {
  .status-chip { display: none; }
}

@media (max-width: 1120px) {
  :root {
    --header-h: 76px;
    --header-h-stuck: 62px;
    --gutter: 24px;
  }

  .brand-line { display: none; }
  .nav-toggle { display: inline-flex; order: 5; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    background: var(--ink-deep);
    border-bottom: 1px solid rgba(242, 169, 0, .32);
    box-shadow: 0 24px 38px -26px rgba(0, 0, 0, .95);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-height .32s ease, visibility .32s ease;
  }

  .site-nav[data-open="true"] {
    max-height: min(72vh, 520px);
    overflow-y: auto;
    visibility: visible;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 20px 18px;
  }

  .nav-list li + li { border-top: 1px solid rgba(245, 241, 232, .09); }

  .nav-list a {
    padding: 15px 12px;
    font-size: 16px;
    border-bottom: 0;
    border-left: 2px solid transparent;
  }

  .nav-list a:hover {
    border-bottom-color: transparent;
    border-left-color: rgba(242, 169, 0, .55);
  }

  .nav-list a[aria-current="page"] {
    border-bottom-color: transparent;
    border-left-color: var(--signal);
  }

  .header-cta { margin-left: auto; order: 4; }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-contact-col { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root {
    --gutter: 18px;
    --header-h: 68px;
    --header-h-stuck: 58px;
  }

  body { font-size: 16px; }

  .brand-name { font-size: 15.5px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-mark::before { width: 10px; height: 10px; }
  .header-inner { gap: 12px; }
  .header-cta { padding: 10px 13px; font-size: 13px; }

  .footer-inner { padding-top: 48px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .footer-base { flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-legal-links { margin-left: 0; }

  .grid-12 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .split-rail { grid-template-columns: minmax(0, 1fr); }
  .index-num { font-size: clamp(44px, 14vw, 68px); }
}

@media (max-width: 360px) {
  .header-cta { display: none; }
  .nav-toggle { margin-left: auto; }
}

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

  .site-progress-fill { transition: none; }
  .status-dot { animation: none !important; opacity: 1; }
  .btn:hover,
  .card:hover { transform: none; }
}
