/* ==========================================================================
   开博体育的方式 — shared site kit
   1. reset / 2. tokens / 3. typography / 4. layout / 5. buttons & atoms
   6. header / 7. footer / 8. media frames / 9. responsive & motion
   ========================================================================== */

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

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

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

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

a { color: inherit; }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}

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

/* 2. tokens --------------------------------------------------------------- */
:root {
  --ink: #071F18;
  --ink-deep: #06100D;
  --stand: #0E3B2E;
  --cyan: #4DFFE0;
  --orange: #FF6A2A;
  --paper: #F3EEDF;
  --paper-ink: #18251F;
  --chalk: #D8E6DE;
  --grid: #6C857B;
  --amber: #FFC857;

  --line: rgba(108, 133, 123, 0.30);
  --line-strong: rgba(108, 133, 123, 0.55);

  --font-display: "Barlow Condensed", "Oswald", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(16px, 3.4vw, 44px);
  --maxw: 1320px;
  --maxw-wide: 1520px;
  --shadow-hard: 6px 6px 0 rgba(6, 16, 13, 0.9);
  --shadow-paper: 8px 8px 0 rgba(6, 16, 13, 0.55);
  --head-h: 76px;
}

/* 3. typography ----------------------------------------------------------- */
body {
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(108, 133, 123, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(108, 133, 123, 0.055) 1px, transparent 1px);
  background-size: 64px 64px, 64px 64px;
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.85;
  letter-spacing: 0.01em;
  min-height: 100vh;
}

@media (min-width: 768px) {
  body { font-size: 17px; }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 87.5%;
  line-height: 1.02;
  letter-spacing: 0.01em;
  color: inherit;
}

h3, h4 { line-height: 1.15; }

p { max-width: 70ch; }

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

.display {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 87.5%;
  line-height: 0.97;
  letter-spacing: 0.01em;
}

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

.label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.label--orange { color: var(--orange); }

.lede {
  font-size: clamp(1.02rem, 1.45vw, 1.25rem);
  line-height: 1.72;
  max-width: 36em;
  opacity: 0.94;
}

.rule {
  height: 0;
  border: 0;
  border-top: 2px solid var(--line-strong);
  margin-block: clamp(24px, 4vw, 48px);
}

.link {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.section--paper .link,
.panel-paper .link { color: #0B5A48; }

/* 4. layout --------------------------------------------------------------- */
.page-main { display: block; }

#main-content { scroll-margin-top: calc(var(--head-h) + 24px); }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--wide { max-width: var(--maxw-wide); }

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

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

.section--paper :focus-visible { outline-color: var(--orange); }

.section--stand { background: var(--stand); }

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

.grid-12 > * { grid-column: 1 / -1; }

@media (min-width: 900px) {
  .col-3 { grid-column: span 3; }
  .col-4 { grid-column: span 4; }
  .col-5 { grid-column: span 5; }
  .col-6 { grid-column: span 6; }
  .col-7 { grid-column: span 7; }
  .col-8 { grid-column: span 8; }
  .col-9 { grid-column: span 9; }
}

/* 5. buttons & atoms ------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.3rem;
  border: 2px solid transparent;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
  background: var(--cyan);
  border-color: var(--cyan);
  color: var(--ink-deep);
  font-weight: 700;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: #7BFFEB;
  border-color: #7BFFEB;
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--orange);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--chalk);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(77, 255, 224, 0.22);
}

.panel-dark {
  background: var(--stand);
  border: 2px solid var(--ink-deep);
  box-shadow: var(--shadow-hard);
  padding: clamp(18px, 2.6vw, 32px);
}

.panel-paper {
  background: var(--paper);
  color: var(--paper-ink);
  border: 2px solid var(--paper-ink);
  box-shadow: var(--shadow-paper);
  padding: clamp(18px, 2.6vw, 32px);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.34rem 0.55rem;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.tag--orange { color: var(--orange); }
.tag--amber { color: var(--amber); }

.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  color: var(--grid);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6em;
}

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

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

.breadcrumb-list a {
  color: var(--chalk);
  text-decoration: none;
}

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

/* 6. header --------------------------------------------------------------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(6, 16, 13, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--stand);
  color: var(--chalk);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  transform: translateY(-180%);
  padding: 0.6rem 0.95rem;
  border: 2px solid var(--ink-deep);
  background: var(--cyan);
  color: var(--ink-deep);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-decoration: none;
  transition: transform 0.18s ease;
}

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

.head-inner {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(12px, 2vw, 36px);
  width: 100%;
  max-width: var(--maxw-wide);
  margin-inline: auto;
  padding: 12px var(--gutter) 10px;
}

.head-brand {
  display: inline-flex;
  flex-direction: column;
  gap: 3px;
  text-decoration: none;
  color: var(--paper);
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 87.5%;
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-accent {
  color: var(--cyan);
  transition: color 0.18s ease;
}

.head-brand:hover .brand-accent,
.head-brand:focus-visible .brand-accent { color: var(--orange); }

.brand-tag {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.16em;
  color: var(--grid);
  white-space: nowrap;
}

/* nav */
.site-nav { min-width: 0; }

.nav-head { display: none; }

.nav-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(6px, 1.2vw, 20px);
}

.nav-item { display: block; }

.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  padding: 10px 2px;
  border-bottom: 2px solid transparent;
  color: var(--chalk);
  font-size: 0.875rem;
  line-height: 1.2;
  text-decoration: none;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.nav-idx {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  color: var(--grid);
  transition: color 0.16s ease;
}

.nav-link:hover { color: var(--cyan); }
.nav-link:hover .nav-idx { color: var(--orange); }

.nav-link[aria-current="page"] {
  color: var(--cyan);
  border-bottom-color: var(--orange);
}

.nav-link[aria-current="page"] .nav-idx { color: var(--orange); }

.nav-foot { display: none; }

.nav-status {
  display: flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: var(--grid);
}

.nav-head-mono { color: var(--orange); }

/* tools */
.head-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.season-switch {
  display: inline-flex;
  align-items: stretch;
  border: 2px solid var(--stand);
  background: rgba(7, 31, 24, 0.72);
}

.season-btn {
  padding: 0.6rem 0.62rem;
  border-right: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  line-height: 1;
  letter-spacing: 0.1em;
  color: var(--chalk);
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.season-btn:last-child { border-right: 0; }

.season-btn:hover {
  color: var(--cyan);
  background: rgba(77, 255, 224, 0.08);
}

.season-btn[aria-pressed="true"] {
  background: var(--cyan);
  color: var(--ink-deep);
  font-weight: 700;
}

.head-cta { white-space: nowrap; }

/* mobile toggle */
.nav-toggle {
  display: none;
  position: relative;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 46px;
  height: 40px;
  border: 2px solid var(--stand);
  color: var(--chalk);
}

.nav-toggle-bar {
  width: 18px;
  height: 2px;
  margin-inline: auto;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-text {
  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;
}

.site-head[data-open] .nav-toggle { border-color: var(--cyan); color: var(--cyan); }
.site-head[data-open] .nav-toggle-bar:nth-of-type(1) { transform: translateY(6px) rotate(45deg); }
.site-head[data-open] .nav-toggle-bar:nth-of-type(2) { opacity: 0; }
.site-head[data-open] .nav-toggle-bar:nth-of-type(3) { transform: translateY(-6px) rotate(-45deg); }

body.nav-open { overflow: hidden; }

/* status rail */
.head-rail {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
  width: 100%;
  max-width: var(--maxw-wide);
  margin-inline: auto;
  padding: 5px var(--gutter) 7px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.16em;
  color: var(--grid);
}

.head-status {
  display: flex;
  align-items: center;
  gap: 0.6em;
  margin: 0;
  color: var(--chalk);
}

.head-meta { margin: 0; max-width: none; }

.head-meta [data-season-value] { color: var(--orange); }

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(77, 255, 224, 0.14);
  animation: statusPulse 2.6s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* reading progress */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 3px;
  background: rgba(108, 133, 123, 0.22);
}

.read-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--cyan), var(--orange));
  transition: transform 0.1s linear;
}

.site-head[data-scrolled] .head-rail { display: none; }
.site-head[data-scrolled] .head-inner { padding-block: 8px; }

/* 7. footer --------------------------------------------------------------- */
.site-foot {
  position: relative;
  overflow: hidden;
  background: var(--ink-deep);
  color: var(--chalk);
  border-top: 3px solid var(--stand);
}

.site-foot::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(77, 255, 224, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 255, 224, 0.045) 1px, transparent 1px);
  background-size: 72px 72px, 72px 72px;
  pointer-events: none;
}

.site-foot::after {
  content: "";
  position: absolute;
  top: -40px;
  right: -60px;
  width: 260px;
  height: 160px;
  background: var(--orange);
  opacity: 0.09;
  transform: skewX(-18deg);
  pointer-events: none;
}

.foot-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  width: 100%;
  max-width: var(--maxw-wide);
  margin-inline: auto;
  padding: clamp(40px, 6vw, 76px) var(--gutter) clamp(28px, 4vw, 48px);
}

@media (min-width: 900px) {
  .foot-top { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
}

.foot-brand {
  padding-left: clamp(12px, 1.6vw, 20px);
  border-left: 4px solid var(--orange);
}

.foot-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grid);
  margin-bottom: 0.9rem;
  max-width: none;
}

.foot-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: 87.5%;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  line-height: 0.95;
  letter-spacing: 0.01em;
  color: var(--paper);
  margin: 0 0 0.65em;
  max-width: none;
}

.foot-accent { color: var(--cyan); }

.foot-summary {
  max-width: 30em;
  color: var(--chalk);
  opacity: 0.88;
}

.foot-note {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  color: var(--grid);
  max-width: none;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: clamp(20px, 3vw, 40px);
  align-content: start;
}

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

.foot-col-title {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--orange);
  padding-bottom: 10px;
  margin: 0 0 14px;
  border-bottom: 1px solid var(--line);
  line-height: 1.4;
}

.foot-list { display: grid; gap: 10px; }

.foot-link {
  display: inline-block;
  color: var(--chalk);
  font-size: 0.9rem;
  line-height: 1.5;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

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

.foot-contact { min-width: 0; }

.contact-line {
  display: grid;
  gap: 2px;
  margin: 0 0 12px;
  max-width: none;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grid);
}

.contact-value {
  color: var(--paper);
  font-size: 0.9rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.foot-service {
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--grid);
  max-width: 28em;
  margin-top: 0.4rem;
}

.foot-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  width: 100%;
  max-width: var(--maxw-wide);
  margin-inline: auto;
  padding: 16px var(--gutter) 26px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  color: var(--grid);
}

.foot-icp,
.foot-copy { margin: 0; max-width: none; }

.foot-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.legal-link {
  color: var(--chalk);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  transition: color 0.16s ease, border-color 0.16s ease;
}

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

/* 8. media frames --------------------------------------------------------- */
.media-frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--stand);
  background: var(--ink-deep);
  overflow: hidden;
}

.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.08) saturate(1.04);
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(77, 255, 224, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(77, 255, 224, 0.07) 1px, transparent 1px);
  background-size: 48px 48px, 48px 48px;
  pointer-events: none;
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-placeholder {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grid);
}

.figure-caption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  line-height: 1.7;
  letter-spacing: 0.08em;
  color: var(--grid);
  max-width: none;
}

/* 9. responsive ----------------------------------------------------------- */
@media (min-width: 961px) and (max-width: 1200px) {
  .nav-link { font-size: 0.8125rem; }
  .nav-idx { display: none; }
  .brand-tag { display: none; }
}

@media (max-width: 1180px) {
  .head-cta { display: none; }
}

@media (max-width: 960px) {
  .head-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding-block: 10px;
  }

  .head-brand { grid-column: 1; grid-row: 1; min-width: 0; }
  .brand-name { font-size: 1.05rem; }
  .brand-tag { display: none; }

  .nav-toggle {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .head-tools {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
  }

  .season-switch { width: 100%; }
  .season-btn { flex: 1 1 auto; text-align: center; padding-block: 0.65rem; }

  .site-nav {
    display: none;
    grid-column: 1 / -1;
    grid-row: 3;
    margin-inline: calc(var(--gutter) * -1);
    padding: 6px var(--gutter) 18px;
    background: var(--ink-deep);
    border-top: 2px solid var(--stand);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.45);
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
  }

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

  .nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0 10px;
    font-family: var(--font-mono);
    font-size: 0.5625rem;
    letter-spacing: 0.16em;
    color: var(--grid);
    max-width: none;
  }

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

  .nav-link {
    display: flex;
    width: 100%;
    padding: 14px 2px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: var(--chalk);
  }

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

  .nav-idx { font-size: 0.625rem; }

  .nav-foot {
    display: grid;
    gap: 14px;
    padding-top: 16px;
  }

  .nav-foot .nav-status { display: flex; }

  .nav-cta { justify-self: start; }

  .head-rail { display: none; }

  .site-head[data-scrolled] .head-inner { padding-block: 8px; }
}

@media (max-width: 560px) {
  .season-btn { font-size: 0.5625rem; letter-spacing: 0.06em; }
  .foot-bottom { font-size: 0.5625rem; }
  .foot-brand { padding-left: 12px; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .status-dot { animation: none; }
  .read-progress-fill { transition: none; }
}
