/* =========================================================
   奇异果体育 · 共享外壳样式 /assets/site.css
   纵向叙事长卷 · 暖纸底 + 果肉翠绿 + 荧光青柠 + 暖橙轮次
   ========================================================= */

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

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

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

ul, ol { 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%; }

/* ---------- 2. Tokens ---------- */
:root {
  --grain: #2FA84F;
  --grain-deep: #176B33;
  --seed: #101614;
  --paper: #F6F1E4;
  --card: #FFFDF7;
  --lime: #C6F135;
  --round: #FF7A1A;
  --round-soft: #FFD9B8;
  --muted: #6E7F72;
  --line: #D8D2C2;

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

  --radius-card: 26px;
  --radius-soft: 18px;
  --radius-pill: 999px;

  --wrap: 1200px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 3. Base typography ---------- */
body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.8;
  color: var(--seed);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.6rem, 7vw, 5.6rem); line-height: 0.98; }
h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); letter-spacing: -0.01em; }

p { max-width: 68ch; }

strong { font-weight: 700; }

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

/* ---------- 4. Focus & accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(16, 22, 20, 0.55);
  border-radius: 6px;
}

.site-footer :focus-visible {
  box-shadow: 0 0 0 4px rgba(246, 241, 228, 0.35);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 300;
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  background: var(--seed);
  color: var(--paper);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.22s var(--ease);
}

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

/* ---------- 5. Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 4vw, 40px);
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 24px;
}

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

.section {
  position: relative;
  padding-block: clamp(52px, 7vw, 88px);
}

.section-head {
  display: grid;
  gap: 14px;
  max-width: 64ch;
  margin-bottom: clamp(28px, 4vw, 44px);
}

.section-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--round);
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.22s var(--ease),
    color 0.22s var(--ease),
    border-color 0.22s var(--ease),
    transform 0.22s var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--grain);
  color: var(--card);
}

.btn-primary:hover { background: var(--grain-deep); }

.btn-ghost {
  background: transparent;
  color: inherit;
  border-color: currentColor;
}

.btn-ghost:hover {
  background: var(--seed);
  color: var(--paper);
  border-color: var(--seed);
}

/* ---------- 7. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  color: var(--seed);
  border-bottom: 1px solid transparent;
  transition: background-color 0.18s var(--ease),
    border-color 0.18s var(--ease),
    box-shadow 0.18s var(--ease);
}

.site-header.is-stuck {
  background: rgba(246, 241, 228, 0.96);
  border-bottom-color: var(--line);
  box-shadow: 0 14px 34px -28px rgba(16, 22, 20, 0.7);
}

.site-header.nav-open {
  background: var(--paper);
  border-bottom-color: var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--header-h);
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: none;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
}

.brand-mark {
  position: relative;
  display: block;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    var(--grain) 0deg 13deg,
    var(--grain-deep) 13deg 26deg
  );
  box-shadow: inset 0 0 0 3px var(--card),
    inset 0 0 0 5px rgba(16, 22, 20, 0.1);
  transition: transform 0.3s var(--ease);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 24%, var(--seed) 0 2px, transparent 2.4px),
    radial-gradient(circle at 74% 40%, var(--seed) 0 2px, transparent 2.4px),
    radial-gradient(circle at 74% 66%, var(--seed) 0 2px, transparent 2.4px),
    radial-gradient(circle at 50% 82%, var(--seed) 0 2px, transparent 2.4px),
    radial-gradient(circle at 26% 66%, var(--seed) 0 2px, transparent 2.4px),
    radial-gradient(circle at 26% 40%, var(--seed) 0 2px, transparent 2.4px),
    radial-gradient(circle at 50% 50%, var(--card) 0 4.5px, transparent 5px);
}

.brand:hover .brand-mark { transform: rotate(24deg); }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.015em;
}

.brand-tag {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Version badge */
.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--lime);
  color: var(--seed);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.version-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--seed);
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  padding: 9px 16px;
  border: 2px solid var(--seed);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.nav-toggle-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 18px;
}

.nav-toggle-box span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--seed);
  transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

[data-nav-toggle][aria-expanded="true"] .nav-toggle-box span:first-child {
  transform: translateY(3px) rotate(45deg);
}

[data-nav-toggle][aria-expanded="true"] .nav-toggle-box span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

/* Desktop nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border-radius: var(--radius-pill);
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  color: var(--seed);
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.nav-link:hover { background: rgba(47, 168, 79, 0.14); }

.nav-link[aria-current="page"] {
  background: var(--lime);
  color: var(--seed);
  font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(16, 22, 20, 0.14);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-actions .btn { padding: 11px 18px; font-size: 14px; }

/* Scroll progress */
.scroll-progress {
  position: absolute;
  left: 0;
  bottom: -1px;
  display: block;
  width: 0;
  height: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, var(--grain), var(--lime));
  pointer-events: none;
}

/* ---------- 8. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 9vw, 120px);
  background: var(--seed);
  color: rgba(246, 241, 228, 0.78);
  border-top: 8px solid var(--grain);
}

.footer-inner {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 1.9fr;
  gap: clamp(32px, 5vw, 64px);
  padding-block: clamp(44px, 6vw, 68px) clamp(32px, 4vw, 48px);
}

.footer-brand .brand-name { color: var(--paper); }
.footer-brand .brand-tag { color: rgba(246, 241, 228, 0.55); }

.footer-brand .brand-mark {
  box-shadow: inset 0 0 0 3px var(--seed),
    inset 0 0 0 5px rgba(246, 241, 228, 0.18);
}

.footer-brand-line {
  max-width: 24ch;
  margin-top: 18px;
  font-size: 14.5px;
  line-height: 1.7;
  color: rgba(246, 241, 228, 0.62);
}

.footer-version {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  font-size: 13px;
  color: rgba(246, 241, 228, 0.6);
}

.footer-version .mono {
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: rgba(198, 241, 53, 0.16);
  color: var(--lime);
  font-size: 12px;
  font-weight: 700;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.footer-col-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
}

.footer-list { display: grid; gap: 4px; }

.footer-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding-block: 3px;
  font-size: 15px;
  line-height: 1.6;
  text-decoration: none;
  color: rgba(246, 241, 228, 0.8);
  transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}

.footer-link::after {
  content: "";
  display: block;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--lime);
  transition: width 0.22s var(--ease);
}

.footer-link:hover {
  color: var(--lime);
  transform: translateX(2px);
}

.footer-link:hover::after { width: 14px; }

.footer-contact {
  border-top: 1px solid rgba(246, 241, 228, 0.14);
  border-bottom: 1px solid rgba(246, 241, 228, 0.14);
  background: rgba(255, 253, 247, 0.03);
}

.footer-contact-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 36px;
  padding-block: 28px;
}

.footer-contact-item {
  display: grid;
  gap: 4px;
  align-content: start;
}

.footer-contact-item--wide { grid-column: span 2; }

.footer-contact-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 122, 26, 0.9);
}

.footer-contact-value {
  font-size: 14.5px;
  line-height: 1.65;
  color: rgba(246, 241, 228, 0.76);
}

.footer-contact-item .footer-link { font-size: 14.5px; }

.footer-legal {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  color: rgba(246, 241, 228, 0.5);
}

.footer-legal-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  justify-content: space-between;
  padding-block: 22px 34px;
}

/* ---------- 9. Content components ---------- */
.label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--grain-deep);
}

.label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--round);
  flex: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--card);
  color: var(--seed);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.tag--lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--seed);
}

.tag--round {
  background: var(--round-soft);
  border-color: var(--round-soft);
  color: #7A3200;
}

.card {
  position: relative;
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--card);
}

.card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.26s var(--ease),
    border-color 0.26s var(--ease),
    background-color 0.26s var(--ease);
}

.card--link::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: var(--grain);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.26s var(--ease);
}

.card--link:hover {
  transform: translateY(-6px);
  border-color: var(--grain);
}

.card--link:hover::before { transform: scaleY(1); }

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

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

.prose h2 {
  margin-top: 2em;
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.prose h3 { margin-top: 1.6em; }

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

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

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

.prose a {
  color: var(--grain-deep);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.prose a:hover { background: rgba(198, 241, 53, 0.5); }

.prose blockquote {
  padding: 16px 22px;
  border-left: 6px solid var(--grain);
  border-radius: 0 var(--radius-soft) var(--radius-soft) 0;
  background: var(--card);
  color: var(--seed);
}

/* Breadcrumb */
.breadcrumb { padding-block: 20px 0; }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

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

.breadcrumb-list li + li::before {
  content: "›";
  font-size: 15px;
  color: var(--line);
}

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

.breadcrumb-list a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* ---------- 10. Media containers ---------- */
.media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-card);
  background:
    radial-gradient(circle at 78% 18%, rgba(198, 241, 53, 0.5), transparent 42%),
    linear-gradient(135deg, rgba(47, 168, 79, 0.22), rgba(255, 217, 184, 0.6));
  border: 1px solid var(--line);
}

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

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

.media-caption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- 11. Reveal & back-to-top ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.js [data-reveal][data-revealed="true"] {
  opacity: 1;
  transform: none;
}

.to-top {
  position: fixed;
  right: clamp(16px, 3vw, 28px);
  bottom: clamp(16px, 3vw, 28px);
  z-index: 80;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--seed);
  color: var(--lime);
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 14px 30px -16px rgba(16, 22, 20, 0.85);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
    visibility 0.22s var(--ease), background-color 0.22s var(--ease);
}

.to-top[data-visible="true"] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover { background: var(--grain-deep); }

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

  .site-nav {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: calc(var(--header-h) + 28px) clamp(20px, 5vw, 40px) 48px;
    background: var(--paper);
    border-top: 6px solid var(--grain);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.22s var(--ease), transform 0.22s var(--ease),
      visibility 0.22s var(--ease);
  }

  .site-nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

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

  .nav-list li + li { border-top: 1px solid var(--line); }

  .nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 18px 4px;
    border-radius: 0;
    font-size: 21px;
    font-weight: 800;
  }

  .nav-link:hover { background: transparent; color: var(--grain-deep); }

  .nav-link[aria-current="page"] {
    background: transparent;
    color: var(--grain-deep);
    box-shadow: none;
  }

  .nav-link[aria-current="page"]::after {
    content: "当前";
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: var(--lime);
    color: var(--seed);
  }

  .nav-actions {
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
  }

  .nav-actions .btn {
    width: 100%;
    padding: 16px 22px;
    font-size: 16px;
  }

  body.nav-open { overflow: hidden; }
}

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

  .footer-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-brand-line { max-width: none; }

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

@media (max-width: 640px) {
  :root { --header-h: 64px; }

  body { font-size: 16px; }

  .brand-mark { width: 34px; height: 34px; }
  .brand-name { font-size: 17px; }

  .version-badge { padding: 4px 10px; font-size: 11px; }

  .nav-toggle { padding: 8px 13px; font-size: 13px; }
  .nav-toggle-text { display: none; }

  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-contact-item--wide { grid-column: span 1; }
  .footer-legal-inner { flex-direction: column; gap: 6px; }
  .footer-link { padding-block: 5px; }
}

/* ---------- 13. Reduced motion ---------- */
@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;
    scroll-behavior: auto !important;
  }

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

  .btn:hover,
  .card--link:hover,
  .footer-link:hover,
  .brand:hover .brand-mark,
  .to-top { transform: none; }
}
