/* ============================================================
   天博克罗地亚赛场 · 共享样式 /assets/site.css
   1 重置  2 变量  3 排版  4 布局与通用组件  5 按钮
   6 头部与侧边轨道  7 页脚  8 响应式  9 焦点与降级动效
   ============================================================ */

/* ---------- 1 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding-left: 0; list-style: none; }
img, svg { max-width: 100%; }
img { display: block; height: auto; }
button { font: inherit; color: inherit; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* ---------- 2 变量 ---------- */
:root {
  --paper: #F4EFE6;
  --white: #FBFBF7;
  --ink: #161A1D;
  --navy: #0E2238;
  --navy-soft: #132C47;
  --red: #D7263D;
  --red-deep: #A3162A;
  --orange: #FF7A1A;
  --grid: #D8D2C4;
  --green: #1F4D46;
  --gold: #F2C14E;

  --font-display: 'Noto Sans SC', 'Source Han Sans SC', 'PingFang SC', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-num: 'Barlow Condensed', 'Oswald', 'Arial Narrow', sans-serif;
  --font-mono: 'IBM Plex Mono', 'SFMono-Regular', monospace;

  --rail-w: 264px;
  --bar-h: 58px;
  --shell-max: 1440px;
  --gut: clamp(18px, 4vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --hair: 1px solid rgba(22, 26, 29, .14);
  --hair-light: 1px solid rgba(251, 251, 247, .14);
}

/* ---------- 3 排版 ---------- */
html { font-size: 16px; }
@media (min-width: 768px) { html { font-size: 17px; } }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-underline-offset: .22em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -.012em;
}
h1 { font-size: clamp(2rem, 5.2vw, 3.75rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: clamp(1rem, 1.4vw, 1.15rem); }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--red-deep); }
a:hover { color: var(--red); }
strong { font-weight: 700; }
::selection { background: var(--red); color: var(--white); }
#main-content { scroll-margin-top: calc(var(--bar-h) + 18px); }

/* ---------- 4 布局与通用组件 ---------- */
.container {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.grid { display: grid; gap: clamp(16px, 2.4vw, 32px); }
.grid--7-5, .grid--5-7 { grid-template-columns: 1fr; }
.grid--cards { grid-template-columns: 1fr; }
@media (min-width: 760px) {
  .grid--cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 900px) {
  .grid--7-5 { grid-template-columns: 7fr 5fr; }
  .grid--5-7 { grid-template-columns: 5fr 7fr; }
}
@media (min-width: 1180px) {
  .grid--cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.stack { display: flex; flex-direction: column; gap: var(--stack-gap, 16px); }

.section { padding-block: clamp(40px, 6vw, 88px); border-top: var(--hair); }
.section__num {
  display: block;
  font-family: var(--font-num);
  font-size: clamp(38px, 6.5vw, 92px);
  font-weight: 800;
  line-height: .86;
  letter-spacing: .01em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(22, 26, 29, .3);
}
.section__title {
  font-size: clamp(1.35rem, 2.8vw, 2.35rem);
  margin-top: .15em;
}

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--red-deep);
}

.lede {
  max-width: 60ch;
  font-size: clamp(1.02rem, 1.5vw, 1.2rem);
  line-height: 1.72;
  color: rgba(22, 26, 29, .78);
}

.rule { height: 0; border: 0; border-top: var(--hair); margin-block: clamp(24px, 3vw, 40px); }

/* 面包屑 */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-block: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.breadcrumb__item { color: rgba(22, 26, 29, .62); text-decoration: none; }
.breadcrumb__item:hover { color: var(--red-deep); text-decoration: underline; }
.breadcrumb__item[aria-current="page"] { color: var(--ink); font-weight: 700; }
.breadcrumb__sep { color: rgba(22, 26, 29, .3); }

/* 卡片与标签 */
.card {
  position: relative;
  background: var(--white);
  border: var(--hair);
  padding: clamp(18px, 2.4vw, 28px);
  box-shadow: 0 1px 0 var(--grid), 0 22px 44px -40px rgba(14, 34, 56, .85);
}
.card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.card__meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(22, 26, 29, .55);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--ink);
  background: transparent;
}
.tag--red { background: var(--red); border-color: var(--red); color: var(--white); }
.tag--green { background: var(--green); border-color: var(--green); color: var(--white); }
.tag--gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }

/* 图片容器基础规则（页面阶段放图） */
.media-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-soft) 100%);
  border: var(--hair);
}
.media-frame > img { width: 100%; height: 100%; object-fit: cover; }
.media-frame--3x2 { aspect-ratio: 3 / 2; }
.media-frame--16x9 { aspect-ratio: 16 / 9; }
.media-frame--1x1 { aspect-ratio: 1 / 1; }
.media-frame--slant { clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%); }
.media-frame__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(251, 251, 247, .16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(251, 251, 247, .16) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* 显现 */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
  transition-delay: calc(var(--reveal-i, 0) * 80ms);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 5 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease);
}
.btn--primary { background: var(--red); color: var(--white); }
.btn--primary:hover { background: var(--red-deep); color: var(--white); transform: translate(2px, 2px); }
.btn--line { border-color: rgba(22, 26, 29, .38); color: var(--ink); }
.btn--line:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn--ghost { border-color: rgba(251, 251, 247, .38); color: var(--white); }
.btn--ghost:hover { background: rgba(251, 251, 247, .12); border-color: var(--white); color: var(--white); }
.btn--block { display: flex; width: 100%; }

/* ---------- 6 头部与侧边轨道 ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 300;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform .18s var(--ease);
}
.skip-link:focus { transform: translateY(0); color: var(--white); }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--rail-w);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--navy) 0%, #0B1B2C 100%);
  color: var(--white);
  border-right: var(--hair-light);
  z-index: 80;
  transition: width .28s var(--ease);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 20px;
  border-bottom: var(--hair-light);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--white);
  text-decoration: none;
}
.brand:hover { color: var(--white); }
.brand__mark {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  background-image: repeating-conic-gradient(var(--red) 0% 25%, var(--white) 0% 50%);
  background-size: 17px 17px;
  box-shadow: 0 0 0 1px rgba(251, 251, 247, .45);
}
.brand__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.brand__name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.2;
  white-space: nowrap;
}
.brand__tag {
  font-size: 11px;
  letter-spacing: .06em;
  line-height: 1.3;
  color: rgba(251, 251, 247, .56);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: transparent;
  border: 1px solid rgba(251, 251, 247, .3);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  cursor: pointer;
}
.nav-toggle__bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  width: 18px;
  height: 12px;
}
.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform .2s var(--ease), opacity .2s var(--ease);
}
.nav-toggle__label { white-space: nowrap; }

.rail {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.rail__scroll {
  display: flex;
  flex-direction: column;
  gap: 22px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 24px 22px 20px;
}
.rail__label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(251, 251, 247, .44);
}
.rail__nav { display: block; }
.rail__list { display: flex; flex-direction: column; }
.rail__item + .rail__item { border-top: 1px solid rgba(251, 251, 247, .1); }
.rail__link {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 11px 8px 11px 13px;
  border-left: 3px solid transparent;
  color: rgba(251, 251, 247, .76);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}
.rail__link:hover { color: var(--white); background: rgba(251, 251, 247, .05); border-left-color: rgba(215, 38, 61, .55); }
.rail__num {
  flex: 0 0 auto;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  color: rgba(251, 251, 247, .45);
  transition: color .18s var(--ease);
}
.rail__txt { min-width: 0; }
.rail__link[aria-current="page"] {
  color: var(--white);
  background: rgba(251, 251, 247, .07);
  border-left-color: var(--red);
}
.rail__link[aria-current="page"] .rail__num { color: var(--white); }

.rail__cta { display: flex; flex-direction: column; gap: 10px; }
.rail__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(251, 251, 247, .6);
}
.rail__dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, .18);
  animation: rail-pulse 2.6s var(--ease) infinite;
}
@keyframes rail-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(255, 122, 26, .18); }
  50% { box-shadow: 0 0 0 6px rgba(255, 122, 26, .06); }
}

.rail__foot {
  padding: 14px 22px;
  border-top: var(--hair-light);
  font-size: 12px;
}
.rail__mail {
  color: rgba(251, 251, 247, .68);
  font-family: var(--font-mono);
  letter-spacing: .1em;
  text-decoration: none;
}
.rail__mail:hover { color: var(--white); text-decoration: underline; }

.rail-collapse {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 22px;
  background: transparent;
  border: 0;
  border-top: var(--hair-light);
  color: rgba(251, 251, 247, .58);
  font-size: 12px;
  letter-spacing: .06em;
  cursor: pointer;
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.rail-collapse:hover { color: var(--white); background: rgba(251, 251, 247, .06); }
.rail-collapse__icon {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .22s var(--ease);
}
.rail-collapse__txt { white-space: nowrap; }

.rail-scrim { display: none; }

/* 桌面折叠态 */
@media (min-width: 1024px) {
  :root[data-rail="compact"] { --rail-w: 88px; }
  :root[data-rail="compact"] .brand__text,
  :root[data-rail="compact"] .rail__label,
  :root[data-rail="compact"] .rail__txt,
  :root[data-rail="compact"] .rail__cta,
  :root[data-rail="compact"] .rail__meta span:not(.rail__dot),
  :root[data-rail="compact"] .rail__foot,
  :root[data-rail="compact"] .rail-collapse__txt { display: none; }
  :root[data-rail="compact"] .site-header__bar { justify-content: center; padding: 18px 8px; }
  :root[data-rail="compact"] .rail__scroll { padding: 16px 8px; gap: 16px; align-items: center; }
  :root[data-rail="compact"] .rail__link {
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 13px 2px 13px 5px;
    font-size: 13px;
  }
  :root[data-rail="compact"] .rail__num { font-size: 13px; }
  :root[data-rail="compact"] .rail-collapse { justify-content: center; padding: 14px 6px; }
  :root[data-rail="compact"] .rail-collapse__icon { transform: rotate(135deg); }
}

/* ---------- 7 页脚 ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--navy) 0%, #0A1826 100%);
  color: rgba(251, 251, 247, .8);
}
.site-footer__band {
  height: 12px;
  background-image: repeating-conic-gradient(var(--red) 0% 25%, var(--paper) 0% 50%);
  background-size: 12px 12px;
}
.site-footer__inner {
  display: grid;
  gap: clamp(28px, 4vw, 56px);
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: clamp(40px, 5.5vw, 72px) var(--gut) clamp(28px, 3.5vw, 48px);
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .site-footer__inner { grid-template-columns: 1.1fr 1.4fr; }
}
@media (min-width: 1180px) {
  .site-footer__inner { grid-template-columns: 1.1fr 1.5fr 1fr; }
}
.site-footer__lead { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.brand--footer .brand__name { font-size: 17px; }
.site-footer__summary {
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.8;
  color: rgba(251, 251, 247, .68);
}
.site-footer__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.site-footer__nav {
  display: grid;
  gap: clamp(20px, 3vw, 36px);
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.foot-nav__title {
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: var(--hair-light);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--white);
}
.foot-nav__list { display: flex; flex-direction: column; gap: 9px; }
.foot-nav__link {
  display: inline-block;
  color: rgba(251, 251, 247, .72);
  font-size: 14px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease), transform .18s var(--ease);
}
.foot-nav__link:hover {
  color: var(--white);
  border-bottom-color: var(--red);
  transform: translateX(2px);
}

.site-footer__contact { display: flex; flex-direction: column; gap: 6px; }
.contact-list { display: flex; flex-direction: column; gap: 10px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-list__k {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(251, 251, 247, .42);
}
.contact-list__v {
  font-size: 14px;
  line-height: 1.6;
  color: var(--white);
  word-break: break-word;
}
.site-footer__note {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(251, 251, 247, .55);
}

.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: 18px var(--gut) 26px;
  border-top: var(--hair-light);
}
.site-footer__legal {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: rgba(251, 251, 247, .58);
}
.site-footer__links { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; }
.site-footer__links a {
  color: rgba(251, 251, 247, .72);
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.site-footer__links a:hover { color: var(--white); border-bottom-color: var(--orange); }

/* ---------- 8 响应式 ---------- */
@media (min-width: 1024px) {
  body {
    padding-left: var(--rail-w);
    transition: padding-left .28s var(--ease);
  }
}

@media (max-width: 1023px) {
  .site-header {
    position: sticky;
    top: 0;
    left: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    flex-direction: column;
    border-right: 0;
    border-bottom: var(--hair-light);
  }
  .site-header__bar {
    position: relative;
    z-index: 95;
    padding: 12px 16px;
    border-bottom: 0;
    background: linear-gradient(180deg, var(--navy) 0%, #0B1B2C 100%);
  }
  .brand__mark { flex-basis: 30px; width: 30px; height: 30px; background-size: 15px 15px; }
  .brand__name { font-size: 15px; }
  .brand__tag { display: none; }
  .nav-toggle { display: inline-flex; }

  .rail {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 340px);
    max-height: 100vh;
    padding-top: calc(var(--bar-h) + 10px);
    background: linear-gradient(180deg, var(--navy) 0%, #0A1826 100%);
    box-shadow: 28px 0 70px -34px rgba(0, 0, 0, .85);
    transform: translateX(-102%);
    visibility: hidden;
    z-index: 90;
    transition: transform .3s var(--ease), visibility .3s var(--ease);
  }
  .site-header[data-open="true"] .rail {
    transform: translateX(0);
    visibility: visible;
  }
  .rail-collapse { display: none; }
  .rail__scroll { padding: 20px 20px 24px; }

  .rail-scrim {
    display: block;
    position: fixed;
    inset: 0;
    padding: 0;
    border: 0;
    background: rgba(10, 24, 38, .62);
    opacity: 0;
    pointer-events: none;
    z-index: 85;
    transition: opacity .25s var(--ease);
  }
  .site-header[data-open="true"] .rail-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .site-header[data-open="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
  .site-header[data-open="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
  .site-header[data-open="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

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

@media (max-width: 420px) {
  .nav-toggle__label { display: none; }
}

/* ---------- 9 焦点与降级动效 ---------- */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
.site-header :focus-visible,
.site-footer :focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .rail__dot { animation: none; }
  .btn--primary:hover,
  .foot-nav__link:hover { transform: none; }
}
