/* ==========================================================================
   德赢体育 Site Kit
   /assets/site.css
   ========================================================================== */

/* ---------- 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, li,
th, td, form, fieldset, legend, button, input, textarea, select {
  margin: 0;
  padding: 0;
}
ul[class], ol[class] { list-style: none; }
img, picture, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; }
[hidden] { display: none !important; }

:root {
  /* 色彩系统 */
  --deep-blue: #0B1B2B;
  --panel-blue: #102B45;
  --link-blue: #1D4E89;
  --signal: #F0452C;
  --gold: #FFC857;
  --snow: #F4F6FB;
  --mist: #DCE3EC;
  --ink: #111827;
  --note: #6B7280;

  /* 字体系统 */
  --font-base: "Noto Sans SC", "Microsoft YaHei", sans-serif;
  --font-display: "Barlow Condensed", "Noto Sans SC", sans-serif;
  --font-data: "JetBrains Mono", "SFMono-Regular", monospace;

  /* 布局变量 */
  --container-width: 1280px;
  --gutter: 24px;
  --radius-sm: 2px;
  --radius-md: 8px;
  --header-h: 80px;
  --header-h-scrolled: 64px;
  --ease: 0.2s ease-out;

  /* 字号变量 */
  --body-scale: 16px;
  --headline-scale: clamp(2rem, 5vw, 4.5rem);
  --deco-scale: clamp(3rem, 10vw, 8rem);

  /* 层级 */
  --z-header: 100;
  --z-nav: 96;
  --z-toggle: 120;
  --z-backtop: 90;
}

::selection {
  background: var(--gold);
  color: var(--deep-blue);
}

/* ---------- 2. 基础排版 ---------- */
body {
  font-family: var(--font-base);
  font-size: var(--body-scale);
  line-height: 1.6;
  background: var(--snow);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.15;
  color: var(--deep-blue);
}
h1 { font-size: var(--headline-scale); }
h2 { font-size: clamp(1.5rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

main a {
  color: var(--link-blue);
  transition: color var(--ease);
}
main a:hover {
  color: var(--signal);
}

main#main-content {
  display: block;
}
main#main-content:focus {
  outline: none;
}
#main-content {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

/* ---------- 3. 布局容器与网格 ---------- */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow {
  max-width: 820px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
}
.grid > * {
  grid-column: 1 / -1;
}
@media (min-width: 768px) {
  .grid > .col-3 { grid-column: span 3; }
  .grid > .col-4 { grid-column: span 4; }
  .grid > .col-5 { grid-column: span 5; }
  .grid > .col-6 { grid-column: span 6; }
  .grid > .col-7 { grid-column: span 7; }
  .grid > .col-8 { grid-column: span 8; }
  .grid > .col-9 { grid-column: span 9; }
  .grid > .col-12 { grid-column: 1 / -1; }
}

/* ---------- 4. 跳过链接与可访问工具 ---------- */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--signal);
  color: #fff;
  padding: 10px 20px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 0 0 8px 8px;
  transition: top var(--ease);
}
.skip-link:focus {
  top: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.text-muted { color: var(--note); }
.text-center { text-align: center; }

/* ---------- 5. 页头 ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: linear-gradient(to bottom, rgba(11,27,43,0.62), rgba(11,27,43,0.12));
  border-bottom: 1px solid transparent;
  transition: height var(--ease), background-color var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--signal) 0 80px, var(--gold) 80px 160px, transparent 160px);
  z-index: 3;
  pointer-events: none;
}
.site-header.is-scrolled {
  height: var(--header-h-scrolled);
  background: rgba(11, 27, 43, 0.97);
  border-bottom-color: rgba(240, 69, 44, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: var(--container-width);
  height: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.header-progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  z-index: 2;
  height: 2px;
  width: 0;
  background: linear-gradient(to right, var(--signal), var(--gold));
  transition: width 0.1s linear;
  pointer-events: none;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  color: #fff;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--signal);
  clip-path: polygon(0 0, 100% 0, 72% 100%, 0 100%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  line-height: 1;
  color: #fff;
  flex-shrink: 0;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0.03em;
  color: #fff;
}
.brand-name small {
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-left: 3px;
}
.brand-slogan {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: rgba(244, 246, 251, 0.68);
  margin-top: 4px;
  white-space: nowrap;
}

/* 桌面导航 */
.site-nav {
  margin-inline: auto;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 12px;
  color: rgba(244, 246, 251, 0.86);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-bottom: 2px solid transparent;
  transition: color var(--ease), border-color var(--ease), background-color var(--ease);
}
.nav-list a:hover,
.nav-list a[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--signal);
}
.nav-list a[aria-current="page"] .nav-index {
  color: var(--signal);
}
.nav-index {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0;
}

/* 页头 CTA */
.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--signal);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  flex-shrink: 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  transition: background-color var(--ease), transform var(--ease);
}
.header-cta:hover {
  background: #c6381e;
  transform: translateY(-2px);
}
.header-cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--deep-blue), 0 0 0 4px var(--gold);
}
.cta-arrow {
  font-family: var(--font-data);
  font-size: 14px;
  line-height: 1;
}

/* 移动导航切换按钮 */
.nav-toggle {
  display: none;
  position: relative;
  z-index: var(--z-toggle);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border: 1px solid rgba(244, 246, 251, 0.28);
  border-radius: 4px;
  transition: border-color var(--ease);
}
.nav-toggle:hover {
  border-color: var(--gold);
}
.nav-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--deep-blue), 0 0 0 4px var(--gold);
}
.nav-toggle-line {
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle[data-open] .nav-toggle-line:nth-child(2) {
  opacity: 0;
}
.nav-toggle[data-open] .nav-toggle-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[data-open] .nav-toggle-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* 返回顶部 */
.back-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: var(--z-backtop);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--deep-blue);
  color: var(--gold);
  font-size: 18px;
  line-height: 1;
  border-radius: 2px;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%);
  box-shadow: 0 8px 16px rgba(11, 27, 43, 0.3);
  transition: background-color var(--ease), transform var(--ease), opacity var(--ease);
}
.back-top:hover {
  background: var(--signal);
  transform: translateY(-3px);
}
.back-top:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--deep-blue), 0 0 0 4px var(--gold);
}

/* 移动端页头*/
body.nav-open {
  overflow: hidden;
}

@media (max-width: 991px) {
  .site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--z-nav);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--deep-blue);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-24px);
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out, transform 0.3s ease-out;
    margin: 0;
  }
  .site-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-list {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 420px;
    gap: 4px;
    padding: 24px;
  }
  .nav-list a {
    width: 100%;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.7rem;
    color: var(--snow);
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-list a:hover,
  .nav-list a[aria-current="page"] {
    color: var(--gold);
    border-bottom-color: var(--signal);
  }
  .nav-index {
    color: var(--signal);
    font-size: 14px;
  }
  .header-cta {
    margin-left: auto;
  }
  .nav-toggle {
    display: inline-flex;
    margin-left: 8px;
  }
}

@media (min-width: 992px) {
  .header-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
  }
  .site-nav {
    justify-self: center;
    margin: 0;
  }
  .header-cta {
    justify-self: end;
  }
  .nav-toggle {
    display: none;
  }
}

@media (max-width: 639px) {
  .header-cta .cta-label {
    display: none;
  }
  .header-cta {
    width: 40px;
    height: 40px;
    padding: 0;
  }
  .cta-arrow {
    font-size: 18px;
  }
}

/* ---------- 6. 页脚 ---------- */
.site-footer {
  position: relative;
  background: var(--deep-blue);
  color: var(--snow);
  border-top: 3px solid var(--gold);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -3px;
  left: 0;
  width: 120px;
  height: 3px;
  background: var(--signal);
  z-index: 1;
}

.footer-top {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 48px 24px;
  padding: 64px 0 48px;
}
.footer-brand {
  grid-column: span 5;
}
.footer-nav {
  grid-column: span 2;
}
.footer-help {
  grid-column: span 2;
}
.footer-contact {
  grid-column: span 3;
}

.footer-logo {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 14px;
}
.footer-logo small {
  font-family: var(--font-data);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-left: 2px;
}
.footer-desc {
  color: rgba(244, 246, 251, 0.72);
  font-size: 14px;
  line-height: 1.8;
  max-width: 36em;
}
.footer-trust {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(244, 246, 251, 0.56);
  font-size: 12px;
  line-height: 1.7;
  max-width: 42em;
}

.footer-nav ul,
.footer-help ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-nav a,
.footer-help a {
  display: inline-block;
  padding: 6px 0;
  color: rgba(244, 246, 251, 0.75);
  font-size: 14px;
  transition: color var(--ease);
}
.footer-nav a:hover,
.footer-help a:hover {
  color: var(--gold);
}

.footer-heading {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 0.12em;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 8px;
  position: relative;
}
.footer-heading::after {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--signal);
  position: absolute;
  bottom: 0;
  left: 0;
}

.footer-contact ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-contact-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.contact-label {
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.footer-contact-item span:not(.contact-label),
.footer-contact-item a {
  color: rgba(244, 246, 251, 0.75);
  font-size: 14px;
  line-height: 1.6;
}
.footer-contact-item a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
}
.footer-bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  font-family: var(--font-data);
  font-size: 12px;
  color: rgba(244, 246, 251, 0.45);
}
.footer-note {
  font-family: var(--font-base);
  font-size: 12px;
  color: rgba(244, 246, 251, 0.35);
}

@media (max-width: 991px) {
  .footer-brand { grid-column: span 12; }
  .footer-nav { grid-column: span 6; }
  .footer-help { grid-column: span 6; }
  .footer-contact { grid-column: span 12; }
}
@media (max-width: 639px) {
  .footer-top { padding: 48px 0 24px; }
  .footer-nav { grid-column: span 12; }
  .footer-help { grid-column: span 12; }
  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* ---------- 7. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  transition: background-color var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--snow), 0 0 0 4px var(--gold);
}
.btn-primary {
  background: var(--signal);
  color: #fff;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
.btn-primary:hover {
  background: #c6381e;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  color: var(--link-blue);
  border: 1px solid var(--link-blue);
  border-radius: 2px;
}
.btn-outline:hover {
  border-color: var(--signal);
  color: var(--signal);
}
.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

/* ---------- 8. 面包屑 ---------- */
.breadcrumb {
  padding: 28px 0 8px;
  font-size: 14px;
}
.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
}
.breadcrumb-item:not(:last-child)::after {
  content: "/";
  color: var(--mist);
  padding-left: 8px;
  font-family: var(--font-data);
}
.breadcrumb-link {
  color: var(--link-blue);
  transition: color var(--ease);
}
.breadcrumb-link:hover {
  color: var(--signal);
}
.breadcrumb-current {
  color: var(--note);
  font-weight: 600;
}

/* ---------- 9. 章节标题 ---------- */
.section-heading {
  margin-bottom: 28px;
}
.section-kicker {
  display: block;
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 6px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  line-height: 1.15;
  color: var(--deep-blue);
}

/* ---------- 10. 卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--mist);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}
.card:hover,
.card:focus-within {
  border-color: var(--signal);
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(11, 27, 43, 0.1);
}
.card-body {
  padding: 20px;
}
.card-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 20px;
  line-height: 1.25;
  margin-bottom: 8px;
  color: var(--deep-blue);
}
.card-meta {
  font-family: var(--font-data);
  font-size: 12px;
  color: var(--note);
}

/* ---------- 11. 响应式图片容器 ---------- */
.media-frame {
  position: relative;
  display: block;
  background: var(--panel-blue);
  overflow: hidden;
}
.media-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media-frame::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: 44px;
  height: 44px;
  background: rgba(240, 69, 44, 0.45);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.media-frame.is-16x9 { aspect-ratio: 16 / 9; }
.media-frame.is-4x3 { aspect-ratio: 4 / 3; }
.media-frame.is-3x2 { aspect-ratio: 3 / 2; }
.media-frame.is-1x1 { aspect-ratio: 1 / 1; }
.media-frame.is-21x9 { aspect-ratio: 21 / 9; }

.media-placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 24px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(244, 246, 251, 0.35);
}

/* ---------- 12. 徽章与标签 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-family: var(--font-data);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.4;
}
.badge-gold { background: var(--gold); color: var(--deep-blue); }
.badge-orange { background: var(--signal); color: #fff; }
.badge-blue { background: var(--link-blue); color: #fff; }
.badge-outline { border: 1px solid var(--mist); color: var(--note); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-family: var(--font-data);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  background: var(--panel-blue);
  color: var(--snow);
  line-height: 1.6;
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}
.tag-signal { background: var(--signal); color: #fff; }
.tag-gold { background: var(--gold); color: var(--deep-blue); }

/* ---------- 13. 焦点与减少动效 ---------- */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .card:hover,
  .card:focus-within {
    transform: none;
  }
  .back-top:hover {
    transform: none;
  }
  .header-cta:hover {
    transform: none;
  }
}
