/* ===================================================================
   浩瀚体育汇 全站共享样式 / assets/site.css
   =================================================================== */

/* ---------- 1. 变量与重置 ---------- */
:root {
  --night: #0B1F3A;
  --deep: #14345C;
  --signal: #1E5A99;
  --orange: #FF6A00;
  --neon: #39FF14;
  --rock: #8A9BA8;
  --moss: #7A8450;
  --clay: #E2725B;
  --cream: #F5F1E8;
  --font-head: Impact, 'Arial Black', sans-serif;
  --font-body: system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, monospace;
  --gutter: clamp(1rem, 2.5vw, 3rem);
  --w-max: 1280px;
}

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

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

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--night);
  background: var(--cream);
  min-height: 100vh;
}

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

ul, ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

address {
  font-style: normal;
}

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

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

#main-content {
  scroll-margin-top: 96px;
}

#main-content:focus {
  outline: none;
}

/* ---------- 2. 通用容器与跳转/进度条 ---------- */
.container {
  width: 100%;
  max-width: var(--w-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 1rem;
  z-index: 400;
  background: var(--neon);
  color: var(--night);
  font-weight: 700;
  padding: .55rem 1.1rem;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
  transition: top .25s ease;
}

.skip-link:focus {
  top: 0;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--neon), var(--orange));
  z-index: 300;
  pointer-events: none;
  transition: width .15s ease;
}

/* ---------- 3. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1.15rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: .95rem;
  line-height: 1;
  white-space: nowrap;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.btn-orange {
  background: var(--orange);
  color: #fff;
  box-shadow: 4px 4px 0 rgba(255,106,0,.28);
}

.btn-orange:hover {
  background: #e55d00;
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 rgba(255,106,0,.4);
}

.btn-ghost {
  background: transparent;
  color: var(--neon);
  border: 1px solid var(--neon);
}

.btn-ghost:hover {
  background: rgba(57,255,20,.08);
  box-shadow: 0 0 14px rgba(57,255,20,.16);
}

.btn-arrow {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  transition: transform .2s ease;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* ---------- 4. 头部 ---------- */
.site-header {
  position: relative;
  z-index: 100;
  background-color: var(--night);
  background-image:
    linear-gradient(rgba(30,90,153,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30,90,153,.16) 1px, transparent 1px);
  background-size: 32px 32px;
  border-bottom: 1px solid rgba(57,255,20,.2);
}

.header-topline {
  background: #060E1D;
  border-bottom: 1px solid rgba(138,155,168,.18);
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--rock);
}

.header-topline-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 30px;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  letter-spacing: .04em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon);
  box-shadow: 0 0 8px rgba(57,255,20,.8);
}

.header-domain {
  letter-spacing: .08em;
  white-space: nowrap;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 84px;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-shrink: 0;
}

.brand-mark {
  position: relative;
  width: 12px;
  height: 36px;
  background: var(--orange);
  border-radius: 2px;
  transform: skewX(-12deg);
  flex-shrink: 0;
}

.brand-mark::before {
  content: '';
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 4px;
  width: 4px;
  background: var(--neon);
  border-radius: 1px;
}

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

.brand-name {
  font-family: var(--font-head);
  font-size: 1.75rem;
  letter-spacing: .04em;
  color: var(--cream);
  line-height: 1.1;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  color: var(--rock);
  margin-top: 3px;
  white-space: nowrap;
}

.header-nav {
  display: none;
  margin-left: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: .25rem;
}

.nav-link {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  padding: .6rem .65rem;
  font-size: .95rem;
  color: var(--cream);
  border-bottom: 2px solid transparent;
  transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

.nav-index {
  font-family: var(--font-mono);
  font-size: .68rem;
  color: var(--orange);
}

.nav-link:hover {
  color: var(--neon);
  border-bottom-color: var(--neon);
  background: rgba(57,255,20,.06);
}

.nav-link[aria-current="page"] {
  color: var(--neon);
  border-bottom-color: var(--orange);
  background: rgba(255,106,0,.1);
}

.header-cta {
  display: none;
  flex-shrink: 0;
  margin-left: .5rem;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  padding: .55rem .8rem;
  border: 1px solid rgba(245,241,232,.25);
  border-radius: 4px;
  background: rgba(11,31,58,.6);
  color: var(--cream);
  font-size: .85rem;
  font-weight: 600;
}

.nav-toggle-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background: var(--neon);
  transition: background-color .2s ease;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: inherit;
  transition: top .2s ease, transform .2s ease;
}

.nav-toggle-icon::before {
  top: -7px;
}

.nav-toggle-icon::after {
  top: 7px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon {
  background: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

/* 移动导航抽屉 */
.header-nav[data-open] {
  display: block;
}

.header-nav[data-open] {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--night);
  border-top: 3px solid var(--orange);
  border-bottom: 1px solid rgba(57,255,20,.2);
  box-shadow: 0 20px 40px rgba(0,0,0,.45);
  padding: .5rem var(--gutter) 1.25rem;
  margin-left: 0;
}

.header-nav[data-open] .nav-list {
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.header-nav[data-open] .nav-link {
  width: 100%;
  padding: .9rem .5rem;
  font-size: 1.05rem;
  border-bottom: 1px solid rgba(245,241,232,.08);
}

.header-nav[data-open] .nav-link[aria-current="page"] {
  background: rgba(255,106,0,.12);
}

.header-nav[data-open] .nav-index {
  font-size: .75rem;
}

/* ---------- 5. 页脚 ---------- */
.site-footer {
  position: relative;
  margin-top: 3rem;
  background-color: var(--night);
  background-image:
    radial-gradient(ellipse at 85% 0%, rgba(30,90,153,.4), transparent 58%),
    radial-gradient(ellipse at 0% 100%, rgba(57,255,20,.06), transparent 50%);
  color: var(--cream);
  border-top: 1px solid rgba(255,106,0,.5);
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange) 0 30%, var(--neon) 30% 36%, transparent 36% 100%);
}

.footer-inner {
  padding-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.site-footer .brand-mark {
  height: 32px;
  width: 10px;
}

.site-footer .brand-name {
  font-size: 1.55rem;
}

.site-footer .brand-tagline {
  color: var(--neon);
}

.footer-trust {
  margin-top: 1rem;
  font-size: .9rem;
  line-height: 1.8;
  color: var(--rock);
  max-width: 34ch;
}

.footer-title {
  font-family: var(--font-mono);
  font-size: .9rem;
  letter-spacing: .18em;
  color: var(--neon);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid rgba(30,90,153,.45);
}

.footer-title::before {
  content: '// ';
  color: var(--orange);
}

.footer-links {
  display: grid;
  gap: .2rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem 0;
  font-size: .88rem;
  color: var(--rock);
  transition: color .2s ease, padding-left .2s ease;
}

.footer-links a::before {
  content: '→';
  font-family: var(--font-mono);
  color: var(--orange);
  transition: transform .2s ease;
}

.footer-links a:hover {
  color: var(--neon);
  padding-left: .65rem;
}

.footer-links a:hover::before {
  transform: translateX(3px);
}

.footer-contact .contact-line {
  display: flex;
  gap: .6rem;
  margin-bottom: .55rem;
  font-size: .88rem;
  color: var(--rock);
  line-height: 1.6;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: .72rem;
  color: var(--signal);
  flex-shrink: 0;
  padding-top: .2rem;
}

.footer-bottom {
  margin-top: 3rem;
  border-top: 1px solid rgba(245,241,232,.12);
  padding-block: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: var(--rock);
}

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

.footer-copy {
  margin-left: auto;
}

.back-to-top {
  position: fixed;
  right: 1.2rem;
  bottom: 1.2rem;
  z-index: 120;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(255,106,0,.35);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}

.back-to-top:hover {
  background: #e55d00;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* ---------- 6. 页面基础组件 ---------- */
.section {
  padding-block: 2rem;
}

.section-dark {
  background: var(--night);
  color: var(--cream);
}

.section-deep {
  background: var(--deep);
  color: var(--cream);
}

.section-light {
  background: var(--cream);
  color: var(--night);
}

.section-head {
  margin-bottom: 2rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .14em;
  color: var(--orange);
  background: rgba(255,106,0,.1);
  border-left: 3px solid var(--orange);
  padding: .15rem .6rem;
  margin-bottom: .8rem;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: .02em;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--rock);
  margin-bottom: 2rem;
}

.breadcrumbs a {
  color: var(--signal);
  transition: color .2s ease;
}

.breadcrumbs a:hover {
  color: var(--orange);
}

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

.prose {
  max-width: 72ch;
  font-size: 1rem;
  line-height: 1.9;
  color: var(--night);
}

.prose h2 {
  font-family: var(--font-head);
  font-size: 1.75rem;
  margin: 2.5rem 0 1rem;
  line-height: 1.2;
}

.prose h3 {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 2rem 0 .75rem;
}

.prose p {
  margin-bottom: 1rem;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: .4rem;
}

.prose a {
  color: var(--signal);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: #e8e4d8;
  padding: .15em .4em;
  border-radius: 3px;
}

.prose-on-dark {
  color: var(--cream);
}

.prose-on-dark h2,
.prose-on-dark h3 {
  color: var(--cream);
}

.prose-on-dark a {
  color: var(--neon);
}

.prose-on-dark code {
  background: rgba(245,241,232,.12);
  color: var(--cream);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--cream);
  border: 1px solid rgba(11,31,58,.08);
  border-left: 4px solid var(--orange);
  border-radius: 4px;
  padding: 1.25rem;
  box-shadow: 0 6px 18px rgba(11,31,58,.08);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(11,31,58,.14);
  border-color: var(--neon);
}

.card-kicker {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .12em;
  color: var(--clay);
  margin-bottom: .5rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .5rem;
  color: var(--night);
}

.card-text {
  font-size: .88rem;
  line-height: 1.65;
  color: #42555f;
}

.card-on-dark {
  background: var(--deep);
  border-color: rgba(30,90,153,.5);
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
  color: var(--cream);
}

.card-on-dark .card-title {
  color: var(--cream);
}

.card-on-dark .card-text {
  color: var(--rock);
}

.figure-img {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 16 / 9;
  background: var(--deep);
}

.figure-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figure-caption {
  font-family: var(--font-mono);
  font-size: .75rem;
  line-height: 1.5;
  color: var(--rock);
  margin-top: .5rem;
}

/* ---------- 7. 响应式 ---------- */
@media (min-width: 480px) {
  .header-domain {
    display: inline;
  }
}

@media (min-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-contact {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .section {
    padding-block: 3.5rem;
  }

  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr 1.4fr;
    gap: 2.5rem;
  }

  .footer-brand {
    padding-right: 1.5rem;
  }

  .footer-contact {
    grid-column: auto;
  }
}

@media (min-width: 1100px) {
  .header-nav {
    display: flex;
  }

  .header-nav[data-open] {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0;
    background: transparent;
  }

  .header-nav[data-open] .nav-list {
    flex-direction: row;
    align-items: center;
    gap: .25rem;
  }

  .header-nav[data-open] .nav-link {
    width: auto;
    padding: .6rem .65rem;
    font-size: .95rem;
    border-bottom: 2px solid transparent;
  }

  .header-nav[data-open] .nav-link[aria-current="page"] {
    background: rgba(255,106,0,.1);
  }

  .header-cta {
    display: inline-flex;
  }

  .nav-toggle {
    display: none;
  }
}

/* ---------- 8. 减少动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

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