/* 杏运赛场 · /assets/site.css —— 共享外壳与基础组件 */

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

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

body, h1, h2, h3, h4, h5, p, ul, ol, li, figure, figcaption, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
table { border-collapse: collapse; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }

:root {
  /* 品牌色板 */
  --night: #0B1F33;
  --grass: #0E6B5C;
  --deep: #083D36;
  --mist: #DCE7E1;
  --amber: #F2A33C;
  --lime: #C6F24E;
  --fog: #AFC0B9;
  --graphite: #101817;
  --turf: #2F7D5F;
  --alert: #D9534F;
  --paper: #F4F7F4;

  --ink-900: #071624;
  --ink-800: #0A1E32;
  --ink-700: #0F2A42;

  /* 尺度 */
  --shell: min(1440px, 100% - 40px);
  --gap: clamp(16px, 2.2vw, 32px);
  --radius: 3px;
  --bd: 2px;
  --bd-strong: 3px;
  --shadow-hard: 6px 6px 0 0 rgba(8, 61, 54, 0.5);
  --shadow-lift: 0 26px 64px -34px rgba(0, 0, 0, 0.78);

  /* 字体 */
  --font-display: "Oswald", "Arial Narrow", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-num: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font-body: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  --step-hero: clamp(2.8rem, 6vw, 6rem);
  --step-section: clamp(1.8rem, 3.2vw, 3.4rem);
  --step-body: 1.0625rem;
  --step-note: 0.8125rem;
}

::selection { background: var(--lime); color: var(--night); }

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: var(--step-body);
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--mist);
  background: var(--night);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--paper);
  text-wrap: balance;
}
p, li { text-wrap: pretty; }
h1 { font-size: var(--step-hero); }
h2 { font-size: var(--step-section); }
h3 { font-size: clamp(1.2rem, 1.6vw, 1.6rem); }

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

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

/* ---------- 通用容器与章节 ---------- */

.shell {
  width: var(--shell);
  margin-inline: auto;
}

.section { padding-block: clamp(56px, 8vw, 122px); }
.section--tight { padding-block: clamp(36px, 5vw, 72px); }
.section--light { background: var(--mist); color: var(--graphite); }
.section--light h1, .section--light h2, .section--light h3 { color: var(--graphite); }
.section--light .lede { color: #33443f; }
.section--deep { background: var(--deep); }
.section--grass { background: var(--grass); }
.section--dark { background: var(--ink-900); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-num);
  font-size: 0.75rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--lime);
}
.eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  background: currentColor;
  flex: 0 0 auto;
}
.section--light .eyebrow { color: var(--grass); }

.section-title { margin-top: 0.4em; }

.lede {
  max-width: 62ch;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--fog);
}

/* ---------- 栅格 ---------- */

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}
.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-12 { grid-column: span 12; }

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 13px 22px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  color: var(--paper);
  background: transparent;
  border: var(--bd) solid rgba(244, 247, 244, 0.7);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 0 var(--grass);
  border-color: var(--lime);
}
.btn--primary { background: var(--amber); color: var(--night); border-color: var(--amber); }
.btn--primary:hover { box-shadow: 5px 5px 0 0 var(--deep); }
.btn--lime { background: var(--lime); color: var(--night); border-color: var(--lime); }
.btn--ghost { color: var(--mist); border-color: rgba(174, 192, 185, 0.6); }
.btn--ghost:hover { color: var(--night); background: var(--mist); }
.section--light .btn { color: var(--graphite); border-color: rgba(16, 24, 23, 0.5); }
.section--light .btn--primary { color: var(--night); border-color: var(--amber); }

/* ---------- 面包屑 ---------- */

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--step-note);
  color: var(--fog);
}
.crumbs li { display: flex; align-items: center; gap: 8px; }
.crumbs li + li::before { content: "/"; color: var(--turf); }
.crumbs a { color: var(--mist); text-decoration: none; }
.crumbs a:hover { color: var(--lime); text-decoration: underline; }
.crumbs [aria-current="page"] { color: var(--lime); font-family: var(--font-num); }
.section--light .crumbs { color: #4b5c56; }
.section--light .crumbs a { color: var(--graphite); }
.section--light .crumbs [aria-current="page"] { color: var(--grass); }

/* ---------- 卡片、标签 ---------- */

.card {
  padding: clamp(18px, 2.4vw, 30px);
  background: var(--ink-700);
  border: var(--bd-strong) solid rgba(174, 192, 185, 0.22);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}
.section--light .card {
  background: var(--paper);
  border-color: rgba(16, 24, 23, 0.16);
  color: var(--graphite);
}

.tag {
  display: inline-block;
  padding: 3px 11px;
  font-family: var(--font-num);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--paper);
  background: var(--grass);
  border-radius: 999px;
}
.tag--amber { background: var(--amber); color: var(--night); }
.tag--lime { background: var(--lime); color: var(--night); }
.tag--alert { background: var(--alert); color: var(--paper); }

/* ---------- 可复用图片容器 ---------- */

.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  isolation: isolate;
  background: var(--deep);
  border: var(--bd-strong) solid var(--ink-700);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(58% 54% at 22% 78%, rgba(198, 242, 78, 0.2), transparent 70%),
    radial-gradient(46% 46% at 78% 28%, rgba(47, 125, 95, 0.44), transparent 72%),
    repeating-linear-gradient(115deg, rgba(244, 247, 244, 0.05) 0 2px, transparent 2px 15px);
}
.media-frame > img,
.media-frame > picture,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--panorama { aspect-ratio: 21 / 9; }
.media-frame--portrait { aspect-ratio: 3 / 4; }
.media-frame--auto { aspect-ratio: auto; }

.media-caption {
  margin-top: 10px;
  font-size: var(--step-note);
  color: var(--fog);
}

/* ---------- 页头 ---------- */

.skip-link {
  position: fixed;
  top: -90px;
  left: 16px;
  z-index: 200;
  padding: 12px 22px;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  color: var(--night);
  background: var(--lime);
  border: var(--bd) solid var(--night);
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 16px; }

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 90;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.site-header.is-solid {
  background: rgba(11, 31, 51, 0.95);
  border-bottom-color: rgba(174, 192, 185, 0.28);
  box-shadow: 0 18px 40px -28px rgba(0, 0, 0, 0.9);
}

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 32px);
  width: var(--shell);
  min-height: 78px;
  margin-inline: auto;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--night);
  background: var(--lime);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  box-shadow: 4px 4px 0 0 rgba(8, 61, 54, 0.85);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--paper);
}
.brand-tag {
  font-family: var(--font-num);
  font-size: 0.6875rem;
  letter-spacing: 0.22em;
  color: var(--lime);
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  color: var(--paper);
  background: rgba(11, 31, 51, 0.55);
  border: var(--bd) solid rgba(174, 192, 185, 0.45);
  border-radius: var(--radius);
}
.nav-toggle-bars { display: inline-flex; flex-direction: column; gap: 4px; width: 20px; }
.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--lime);
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.primary-nav { flex: 1 1 auto; min-width: 0; }
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 0.9vw, 14px);
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list li { flex: 0 0 auto; }
.nav-list a {
  display: inline-block;
  padding: 10px 12px;
  font-size: 0.9375rem;
  white-space: nowrap;
  color: var(--mist);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.nav-list a:hover { color: var(--lime); border-bottom-color: rgba(198, 242, 78, 0.65); }
.nav-list a[aria-current="page"] {
  font-weight: 700;
  color: var(--night);
  background: var(--lime);
  border-bottom-color: var(--lime);
}

.header-utility {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}
.utility-link {
  padding: 8px 10px;
  font-size: 0.875rem;
  color: var(--mist);
  text-decoration: none;
  border: 1px dashed rgba(174, 192, 185, 0.5);
  border-radius: var(--radius);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.utility-link:hover { color: var(--lime); border-color: var(--lime); }
.utility-cta {
  padding: 10px 18px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  color: var(--night);
  background: var(--amber);
  border: var(--bd) solid var(--amber);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.utility-cta:hover {
  transform: translate(-2px, -2px);
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 4px 4px 0 0 var(--deep);
}

.scroll-meter {
  display: block;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--lime), var(--amber) 65%, var(--grass));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

/* ---------- 页脚 ---------- */

.site-footer {
  position: relative;
  margin-top: clamp(72px, 10vw, 140px);
  color: var(--mist);
  background: var(--deep);
  overflow: hidden;
}
.footer-topline {
  height: 6px;
  background: repeating-linear-gradient(
    90deg,
    var(--grass) 0 46px,
    var(--lime) 46px 68px,
    var(--amber) 68px 78px,
    rgba(8, 61, 54, 0) 78px 94px
  );
}

.footer-shell {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.6fr;
  gap: clamp(26px, 3vw, 60px);
  width: var(--shell);
  margin-inline: auto;
  padding: clamp(44px, 6vw, 84px) 0 clamp(28px, 4vw, 46px);
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--night);
  background: var(--lime);
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
}
.footer-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: 0.02em;
  color: var(--paper);
}
.footer-tagline {
  margin-top: 6px;
  font-family: var(--font-num);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  color: var(--lime);
}
.footer-note {
  max-width: 36ch;
  margin-top: 14px;
  font-size: 0.875rem;
  line-height: 1.85;
  color: var(--fog);
}

.footer-col-title {
  padding-bottom: 12px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  color: var(--paper);
  border-bottom: 2px solid rgba(198, 242, 78, 0.32);
}
.footer-list { display: grid; gap: 10px; }
.footer-list a {
  display: inline-block;
  padding-left: 0;
  font-size: 0.9375rem;
  color: var(--mist);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: color 0.18s ease, padding-left 0.18s ease, border-color 0.18s ease;
}
.footer-list a:hover {
  padding-left: 9px;
  color: var(--lime);
  border-left-color: var(--lime);
}

.footer-contact-list { display: grid; gap: 14px; }
.footer-contact-row { display: grid; gap: 2px; }
.footer-contact-label {
  font-family: var(--font-num);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--fog);
}
.footer-contact-value {
  font-size: 0.9375rem;
  color: var(--paper);
  overflow-wrap: anywhere;
}
.footer-contact-note {
  margin-top: 16px;
  padding-left: 12px;
  font-size: 0.8125rem;
  line-height: 1.8;
  color: var(--fog);
  border-left: 3px solid var(--grass);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  width: var(--shell);
  margin-inline: auto;
  padding: 20px 0 34px;
  font-size: var(--step-note);
  color: var(--fog);
  border-top: 1px solid rgba(174, 192, 185, 0.22);
}
.footer-meta {
  font-family: var(--font-num);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}
.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-left: auto;
}
.footer-legal-links a {
  color: var(--fog);
  text-decoration: none;
  border-bottom: 1px solid rgba(174, 192, 185, 0.35);
  transition: color 0.18s ease, border-color 0.18s ease;
}
.footer-legal-links a:hover { color: var(--lime); border-bottom-color: var(--lime); }

/* ---------- 显现动效 ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.3, 1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- 断点 ---------- */

@media (max-width: 1180px) {
  .footer-shell { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-col--contact { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .header-shell {
    flex-wrap: wrap;
    gap: 12px;
    padding-block: 12px;
    min-height: 0;
  }
  .nav-toggle { display: inline-flex; }
  .primary-nav {
    flex: 1 0 100%;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    border-top: 1px solid transparent;
    transition: max-height 0.4s ease, opacity 0.3s ease, visibility 0.3s ease;
  }
  .primary-nav[data-open="true"] {
    max-height: 72vh;
    overflow-y: auto;
    visibility: visible;
    opacity: 1;
    border-top-color: rgba(174, 192, 185, 0.28);
  }
  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-block: 6px;
    overflow: visible;
  }
  .nav-list a {
    display: block;
    padding: 14px 4px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(174, 192, 185, 0.18);
  }
  .nav-list a[aria-current="page"] {
    background: transparent;
    color: var(--lime);
    border-bottom-color: rgba(198, 242, 78, 0.6);
  }
  .header-utility { flex: 0 0 auto; }
  .footer-shell { grid-template-columns: 1fr 1fr; }
  .footer-col--contact { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
  .span-3, .span-4, .span-5, .span-6, .span-7, .span-8 { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  :root { --shell: min(1440px, 100% - 28px); }
  .utility-link { display: none; }
  .brand-tag { display: none; }
  .footer-shell { grid-template-columns: 1fr; }
  .footer-legal-links { margin-left: 0; }
  .lede { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .btn:hover, .utility-cta:hover { transform: none; }
  .nav-list a, .footer-list a, .site-header, .skip-link, .nav-toggle-bar, .primary-nav { transition: none; }
}
