/* ============================================================
   威首页赛场 · /assets/site.css
   共享外壳：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, hr {
  margin: 0;
}

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

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

button { font: inherit; }

/* ---------- 设计变量 ---------- */
:root {
  --navy: #0A1A2F;
  --navy-deep: #071322;
  --teal: #0B3B3C;
  --wine: #57203A;
  --orange: #FF5A28;
  --green: #3DF2A4;
  --silver: #A9B7C6;
  --white: #F4F7FA;
  --mist: #7F93A8;
  --amber: #FFB23E;
  --graphite: #13273F;

  --line: rgba(169, 183, 198, 0.22);
  --line-strong: rgba(169, 183, 198, 0.45);

  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 12px;
  --r-pill: 999px;

  --font-head: "PingFang SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --pad: clamp(18px, 4vw, 40px);
  --header-h: 76px;
  --spring: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- 基础排版 ---------- */
body {
  min-height: 100vh;
  background-color: var(--navy);
  background-image:
    radial-gradient(120% 58% at 82% -4%, rgba(255, 90, 40, 0.16), transparent 62%),
    radial-gradient(96% 52% at 0% 0%, rgba(11, 59, 60, 0.9), transparent 58%);
  background-repeat: no-repeat;
  background-size: 100% 780px, 100% 700px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(34px, 6.2vw, 76px); }
h2 { font-size: clamp(26px, 3.6vw, 42px); }
h3 { font-size: clamp(20px, 2.4vw, 28px); }
h4 { font-size: clamp(17px, 1.8vw, 21px); line-height: 1.3; }

p { overflow-wrap: break-word; }

strong { font-weight: 800; color: var(--white); }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--white); }

::selection { background: rgba(61, 242, 164, 0.28); color: var(--white); }

/* ---------- 可访问性 ---------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  display: inline-block;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--green);
  color: var(--navy-deep);
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(4, 10, 20, 0.5);
  transition: top 0.18s var(--spring);
}
.skip-link:focus,
.skip-link:focus-visible { top: 12px; color: var(--navy-deep); }

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

/* ============================================================
   页头
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: linear-gradient(180deg, rgba(7, 19, 34, 0.98), rgba(10, 26, 47, 0.93));
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 5px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 16px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 2;
}

.scroll-progress {
  --progress: 0;
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--amber) 45%, var(--green));
  transform: scaleX(var(--progress));
  transform-origin: 0 50%;
  transition: transform 0.12s linear;
  z-index: 3;
}

.header-inner {
  position: relative;
  max-width: 1240px;
  margin-inline: auto;
  padding: 14px var(--pad) 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(12px, 2vw, 28px);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
}
.brand:hover { color: var(--white); }

.brand-mark {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, rgba(61, 242, 164, 0.16), rgba(255, 90, 40, 0.2));
  box-shadow: inset 0 1px 0 rgba(244, 247, 250, 0.14);
  display: grid;
  place-content: center;
  gap: 3px;
}
.brand-mark span {
  display: block;
  height: 3px;
  border-radius: 2px;
  background: var(--green);
}
.brand-mark span:nth-child(1) { width: 9px; background: var(--silver); }
.brand-mark span:nth-child(2) { width: 15px; background: var(--orange); }
.brand-mark span:nth-child(3) { width: 21px; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.brand-name {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.02em;
  color: var(--white);
  white-space: nowrap;
}
.brand-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mist);
  white-space: nowrap;
}

.refresh-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(19, 39, 63, 0.62);
  white-space: nowrap;
}
.refresh-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  animation: breathe 2s ease-in-out infinite;
}
.refresh-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--silver);
}

@keyframes breathe {
  0%, 100% { opacity: 0.45; box-shadow: 0 0 0 3px rgba(61, 242, 164, 0.1); }
  50%      { opacity: 1;    box-shadow: 0 0 0 6px rgba(61, 242, 164, 0.2); }
}

/* ---------- 导航 ---------- */
.site-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

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

.nav-item { position: relative; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  color: var(--silver);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s, border-color 0.18s, background-color 0.18s;
}
.nav-link:hover {
  color: var(--white);
  border-color: var(--line-strong);
  background: rgba(244, 247, 250, 0.06);
}
.nav-link[aria-current="page"] {
  color: var(--white);
  border-color: var(--line-strong);
  background: rgba(61, 242, 164, 0.1);
}
.nav-link[aria-current="page"]::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.nav-item--accent .nav-link--accent {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(255, 90, 40, 0.08);
}
.nav-item--accent .nav-link--accent:hover {
  background: var(--orange);
  color: var(--navy-deep);
  border-color: var(--orange);
}
.nav-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 178, 62, 0.2);
  color: var(--amber);
  transition: background-color 0.18s, color 0.18s;
}
.nav-item--accent .nav-link--accent:hover .nav-badge {
  background: rgba(10, 26, 47, 0.22);
  color: var(--navy-deep);
}

.nav-mail {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--mist);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-pill);
  padding: 7px 12px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s, border-color 0.18s;
}
.nav-mail:hover {
  color: var(--white);
  border-color: var(--green);
  border-style: solid;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 9px;
  padding: 9px 15px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: rgba(19, 39, 63, 0.75);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s, background-color 0.18s;
}
.nav-toggle:hover { border-color: var(--green); }

.nav-toggle-icon { display: grid; gap: 4px; }
.nav-toggle-bar {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--white);
  transition: transform 0.2s var(--spring), opacity 0.2s;
}
.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); }

/* ============================================================
   页脚
   ============================================================ */
.site-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 96px);
  background:
    linear-gradient(180deg, rgba(11, 59, 60, 0), rgba(11, 59, 60, 0.6)),
    var(--navy-deep);
  border-top: 1px solid var(--line-strong);
  color: var(--silver);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--line-strong) 0 1px, transparent 1px 18px);
  opacity: 0.55;
  pointer-events: none;
}

.footer-inner {
  max-width: 1240px;
  margin-inline: auto;
  padding: clamp(38px, 6vw, 72px) var(--pad) 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: clamp(24px, 4vw, 52px);
}

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

.footer-col--brand { max-width: 30ch; }

.footer-brand {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.02em;
  color: var(--white);
}

.footer-tagline {
  margin-top: 10px;
  font-size: 14.5px;
  color: var(--silver);
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 5px 12px;
  border: 1px solid rgba(61, 242, 164, 0.32);
  border-radius: var(--r-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--green);
}

.footer-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mist);
  line-height: 1.4;
}

.footer-list { display: grid; gap: 9px; }
.footer-list--contact { gap: 13px; }

.footer-link {
  color: var(--silver);
  font-size: 14.5px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.18s, border-color 0.18s;
}
.footer-link:hover,
.footer-link:focus-visible {
  color: var(--white);
  border-bottom-color: var(--orange);
}

.footer-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mist);
}

.footer-text {
  display: block;
  font-size: 14px;
  color: var(--white);
  overflow-wrap: anywhere;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
}

.footer-base {
  margin-top: clamp(30px, 4vw, 54px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--mist);
}

.footer-hours {
  font-size: 12.5px;
  color: var(--mist);
}

/* ============================================================
   通用组件
   ============================================================ */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.section { padding-block: clamp(40px, 6vw, 88px); }

.section--teal {
  background: linear-gradient(180deg, rgba(11, 59, 60, 0.82), rgba(11, 59, 60, 0.34));
  border-block: 1px solid rgba(61, 242, 164, 0.14);
}

.section--wine {
  background: linear-gradient(180deg, rgba(87, 32, 58, 0.9), rgba(87, 32, 58, 0.42));
  border-block: 1px solid rgba(255, 90, 40, 0.2);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 28px;
  margin-bottom: clamp(22px, 3vw, 38px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(61, 242, 164, 0.32);
  background: rgba(61, 242, 164, 0.07);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

.index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mist);
}

.lead {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.7;
  color: var(--silver);
  max-width: 44ch;
}

.prose { max-width: 38em; }
.prose p + p { margin-top: 1.05em; }
.prose h3 { margin-top: 1.6em; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s var(--spring), background-color 0.18s, color 0.18s, border-color 0.18s;
}

.btn--primary {
  background: var(--orange);
  color: #08131F;
  box-shadow: 0 12px 28px rgba(255, 90, 40, 0.28);
}
.btn--primary:hover { background: #FF7A50; color: #08131F; transform: translateY(-2px); }

.btn--ghost {
  border-color: var(--line-strong);
  background: rgba(244, 247, 250, 0.04);
  color: var(--white);
}
.btn--ghost:hover { border-color: var(--green); color: var(--green); transform: translateY(-2px); }

.btn--quiet {
  padding-inline: 6px;
  color: var(--silver);
  border-color: transparent;
}
.btn--quiet:hover { color: var(--white); }

.btn--sm { padding: 8px 16px; font-size: 13.5px; }

/* ---------- 面包屑 ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mist);
}
.breadcrumb a { color: var(--silver); text-decoration: none; }
.breadcrumb a:hover { color: var(--green); }
.crumb-sep { color: var(--line-strong); }
.crumb-current { color: var(--white); }

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
  grid-template-columns: minmax(0, 1fr);
}
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

/* ---------- 卡片 ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, var(--graphite), #0E2035);
  transition: transform 0.2s var(--spring), border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 40px rgba(4, 10, 20, 0.45);
}
.card--wine {
  background: linear-gradient(165deg, #6A2745, #4A1B31);
  border-color: rgba(255, 90, 40, 0.26);
}
.card__index {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}
.card__title {
  margin-top: 8px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.28;
  color: var(--white);
}
.card__text {
  margin-top: 10px;
  font-size: 15px;
  color: var(--silver);
}

/* ---------- 数据标块 ---------- */
.data-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(61, 242, 164, 0.14);
  color: var(--green);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: 0.92em;
  letter-spacing: 0.02em;
}
.data-chip--amber {
  background: rgba(255, 178, 62, 0.16);
  color: var(--amber);
}

/* ---------- 图片容器基类 ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-radius: 24px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(61, 242, 164, 0.12), transparent 60%),
    linear-gradient(160deg, var(--graphite), var(--teal));
}
.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 26, 47, 0.1), rgba(10, 26, 47, 0.62));
  pointer-events: none;
}
.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--cut {
  border-radius: 22px 22px 22px 4px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 26px), calc(100% - 26px) 100%, 0 100%);
}
.media-frame__caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--silver);
}

/* ---------- 滚动显现 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s var(--spring);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1180px) {
  .nav-mail { display: none; }
  .nav-link { padding: 9px 12px; font-size: 14px; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 18px var(--pad) 26px;
    background: linear-gradient(180deg, #0C2039, #081729);
    border-bottom: 1px solid var(--line-strong);
    box-shadow: 0 24px 40px rgba(4, 10, 20, 0.6);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s var(--spring), transform 0.22s var(--spring), visibility 0.22s;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    z-index: 5;
  }
  .site-nav[data-open="true"] {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  .nav-link {
    justify-content: space-between;
    width: 100%;
    padding: 13px 16px;
    border-radius: var(--r-md);
    border-color: var(--line);
    font-size: 16px;
  }
  .nav-mail {
    display: inline-flex;
    justify-content: center;
    align-self: flex-start;
  }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col--brand { max-width: none; }

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

@media (max-width: 640px) {
  body { font-size: 16px; background-size: 100% 620px, 100% 560px; }

  .header-inner { padding: 12px var(--pad) 16px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  .brand-name { font-size: 17px; }
  .brand-sub { font-size: 9px; letter-spacing: 0.14em; }
  .refresh-chip { padding: 4px 9px; }
  .refresh-label { font-size: 10px; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-base { flex-direction: column; align-items: flex-start; }

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

  .media-frame { border-radius: 20px; }
}

@media (max-width: 400px) {
  .refresh-label { display: none; }
  .refresh-chip { padding: 5px; }
}

/* ============================================================
   动效降级
   ============================================================ */
@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;
  }

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

  .scroll-progress { transition: none; }
}
