/* =========================================================
   猫头鹰赛场 · Site Kit
   /assets/site.css
   1  Reset
   2  Tokens
   3  Typography & base elements
   4  Skip link / focus / motion
   5  Frame + header
   6  Footer
   7  Buttons
   8  Layout primitives
   9  Content components
   10 Responsive
   ========================================================= */

/* ---------- 1. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  padding-inline-start: 0;
  background-color: #071527;
  background-image:
    radial-gradient(1100px 620px at 84% -8%, rgba(25, 27, 58, 0.90), transparent 72%),
    radial-gradient(880px 540px at 4% 4%, rgba(11, 43, 38, 0.88), transparent 68%);
  background-repeat: no-repeat;
  background-attachment: fixed;
}

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

button,
input,
select,
textarea { font: inherit; color: inherit; }

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

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

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

[hidden] { display: none !important; }

::selection { background: #C6FF3E; color: #071527; }

/* ---------- 2. Tokens ---------- */
:root {
  --ink: #071527;
  --moss: #0B2B26;
  --indigo: #191B3A;
  --panel: #10203A;
  --wine: #4A1622;
  --lime: #C6FF3E;
  --amber: #F5B841;
  --mint: #7FE3D4;
  --fog: #E8EEF6;
  --slate: #8FA0B5;

  --line: rgba(127, 227, 212, 0.18);
  --line-strong: rgba(127, 227, 212, 0.36);
  --grid-line: rgba(232, 238, 246, 0.07);
  --panel-hover: #12253F;

  --font-display: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --header-h: 64px;
  --header-h-compact: 48px;
  --rail-w: 44px;
  --shell-max: 1360px;
  --gutter: clamp(16px, 4vw, 48px);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius: 2px;
}

/* ---------- 3. Typography & base elements ---------- */
body {
  color: var(--fog);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.display {
  font-family: var(--font-display);
  font-size: clamp(44px, 7vw, 104px);
  font-weight: 800;
  line-height: 0.94;
  letter-spacing: -0.02em;
  color: var(--fog);
}
.display em {
  font-style: normal;
  font-weight: 200;
  color: var(--mint);
  display: inline-block;
  transform: skewX(-2deg);
}

.num,
.stat__value,
.brand__code,
.index-rail__code,
.index-rail__label,
.index-tag,
.footer-col__title,
.breadcrumbs,
.footer-meta,
.header-tip {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.num { font-weight: 500; }

.index-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint);
}
.index-tag::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--lime);
  flex: 0 0 auto;
}

.prose {
  max-width: 68ch;
  font-size: 17px;
  line-height: 1.75;
  color: var(--fog);
}
.prose p + p { margin-top: 1em; }
.prose a {
  color: var(--mint);
  border-bottom: 1px solid rgba(127, 227, 212, 0.42);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.prose a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}
.prose h2,
.prose h3 { margin-top: 1.6em; margin-bottom: 0.5em; }
.prose ul,
.prose ol {
  margin: 0 0 1em;
  padding-inline-start: 1.1em;
  list-style: none;
}
.prose ul li,
.prose ol li { position: relative; padding-inline-start: 14px; }
.prose ul li::before,
.prose ol li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 6px;
  height: 1px;
  background: var(--lime);
}

/* ---------- 4. Skip link / focus / motion ---------- */
.skip-link {
  position: fixed;
  top: -120px;
  left: 12px;
  z-index: 400;
  padding: 10px 18px;
  background: var(--lime);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: var(--radius);
  transition: top 0.18s var(--ease);
}
.skip-link:focus { top: 12px; color: var(--ink); }

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

/* ---------- 5. Frame + header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 120;
  background: var(--ink);
  border-bottom: 1px solid var(--line-strong);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 30px);
  height: var(--header-h);
  padding-inline: clamp(16px, 2.5vw, 32px);
  transition: height 0.22s var(--ease);
}
.site-header.is-compact .site-header__inner { height: var(--header-h-compact); }

/* left index rail — becomes the page's left physical border */
.index-rail { display: none; }

.index-rail__code {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--lime);
}
.index-rail__ticks {
  flex: 1 1 auto;
  width: 1px;
  margin: 18px 0;
  background-image: repeating-linear-gradient(
    to bottom,
    var(--line-strong) 0 1px,
    transparent 1px 12px
  );
}
.index-rail__label {
  writing-mode: vertical-rl;
  font-size: 10px;
  letter-spacing: 0.34em;
  color: var(--slate);
  white-space: nowrap;
}

/* brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--fog);
  transition: color 0.18s var(--ease);
}
.brand:hover { color: var(--lime); }

.brand__mark {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  background: rgba(127, 227, 212, 0.06);
  transition: border-color 0.22s var(--ease);
}
.brand:hover .brand__mark { border-color: var(--lime); }
.brand__mark::before,
.brand__mark::after {
  content: "";
  position: absolute;
  top: 7px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 6px rgba(198, 255, 62, 0.85);
}
.brand__mark::before { left: 4px; }
.brand__mark::after { right: 4px; }

.brand__text {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand__code {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--slate);
  padding-left: 8px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

/* primary navigation */
.site-nav { margin-inline-start: auto; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.7vw, 26px);
}

.site-nav__link {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--slate);
  white-space: nowrap;
  transition: color 0.18s var(--ease);
}
.site-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s var(--ease);
}
.site-nav__link:hover { color: var(--fog); }
.site-nav__link:hover::after { transform: scaleX(1); }
.site-nav__link[aria-current="page"] {
  color: var(--fog);
  font-weight: 700;
}
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* header tools */
.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.22s var(--ease);
}
.nav-toggle:hover { border-color: var(--lime); }
.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 1px;
  background: var(--fog);
  box-shadow: 0 -5px 0 var(--fog), 0 5px 0 var(--fog);
  transition: background-color 0.18s var(--ease), box-shadow 0.18s var(--ease), transform 0.18s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background: var(--lime);
  box-shadow: 0 -5px 0 var(--lime), 0 5px 0 var(--lime);
  transform: scaleX(1.12);
}

/* favourite hint */
.header-tip {
  position: absolute;
  top: calc(100% + 8px);
  right: clamp(16px, 2.5vw, 32px);
  z-index: 6;
  margin: 0;
  max-width: 264px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.65;
  letter-spacing: 0.01em;
  color: var(--fog);
  background: var(--indigo);
  border: 1px solid var(--line-strong);
  border-left: 2px solid var(--amber);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
}

/* scroll progress */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  pointer-events: none;
  background: rgba(127, 227, 212, 0.10);
}
.scroll-meter__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.12s linear;
}

/* ---------- 6. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 8vw, 128px);
  padding-block: clamp(40px, 5vw, 72px) 32px;
  background:
    linear-gradient(180deg, rgba(7, 21, 39, 0) 0%, rgba(11, 43, 38, 0.88) 38%, rgba(11, 43, 38, 0.98) 100%),
    var(--ink);
  border-top: 1px solid var(--line-strong);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(46%, 640px);
  background: linear-gradient(180deg, rgba(25, 27, 58, 0.62), rgba(74, 22, 34, 0.30));
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(127, 227, 212, 0.05) 0 1px,
    transparent 1px 88px
  );
  pointer-events: none;
}

.site-footer__rules {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  max-width: var(--shell-max);
  margin: 0 auto clamp(28px, 4vw, 52px);
  padding-inline: var(--gutter);
}
.site-footer__rules span {
  display: block;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), rgba(198, 255, 62, 0.12));
}

.site-footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
  max-width: var(--shell-max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.site-footer__brand { display: flex; flex-direction: column; gap: 8px; }

.footer-brand {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--fog);
}
.footer-tagline {
  margin: 0;
  font-size: 13px;
  color: var(--slate);
  letter-spacing: 0.04em;
}
.footer-meta {
  margin: 8px 0 0;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: rgba(143, 160, 181, 0.8);
}

.footer-col { display: flex; flex-direction: column; gap: 12px; }

.footer-col__title {
  margin: 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mint);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--slate);
  line-height: 1.6;
}
.footer-col__list a {
  display: inline-block;
  color: var(--slate);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.footer-col__list a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}
.footer-col--contact .footer-col__list {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: rgba(232, 238, 246, 0.82);
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.4;
  color: var(--fog);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.22s var(--ease), background-color 0.22s var(--ease), color 0.22s var(--ease);
}
.btn:hover { border-color: var(--lime); color: var(--lime); }

.btn--primary {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
  font-weight: 700;
}
.btn--primary:hover {
  background: #D8FF6B;
  border-color: #D8FF6B;
  color: var(--ink);
}

.btn--ghost { background: transparent; }

.btn--sm { padding: 6px 12px; font-size: 12px; }

/* ---------- 8. Layout primitives ---------- */
.wrap {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: clamp(48px, 7vw, 96px); }
.section--tight { padding-block: clamp(32px, 4vw, 64px); }

.band {
  position: relative;
  background: var(--moss);
  border-block: 1px solid var(--line);
}
.band--indigo { background: var(--indigo); }

.grid { display: grid; gap: 16px; }
.grid--12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- 9. Content components ---------- */
.breadcrumbs {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--slate);
}
.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}
.breadcrumbs li { display: inline-flex; align-items: center; }
.breadcrumbs li + li::before {
  content: "/";
  margin-inline: 8px;
  color: rgba(143, 160, 181, 0.5);
}
.breadcrumbs a {
  color: var(--slate);
  border-bottom: 1px solid transparent;
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease);
}
.breadcrumbs a:hover {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 14px;
  border-left: 1px solid var(--line-strong);
}
.stat__value {
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 500;
  line-height: 1;
  color: var(--lime);
}
.stat__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--slate);
}

.data-card {
  position: relative;
  padding: 18px 18px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color 0.22s var(--ease), background-color 0.22s var(--ease);
}
.data-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), rgba(198, 255, 62, 0) 72%);
  opacity: 0.55;
}
.data-card:hover {
  border-color: var(--lime);
  background: var(--panel-hover);
}
.data-card__title {
  margin: 10px 0 6px;
  font-size: 18px;
  font-weight: 700;
  color: var(--fog);
}
.data-card__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--slate);
}
.data-card__foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--amber);
}

/* responsive image container — page stage drops <img>/<picture> inside */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background-color: var(--indigo);
  background-image:
    linear-gradient(135deg, rgba(127, 227, 212, 0.16), transparent 62%),
    repeating-linear-gradient(0deg, rgba(232, 238, 246, 0.05) 0 1px, transparent 1px 28px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.media-frame[data-ratio="21:9"] { aspect-ratio: 21 / 9; }
.media-frame[data-ratio="3:2"] { aspect-ratio: 3 / 2; }
.media-frame[data-ratio="4:3"] { aspect-ratio: 4 / 3; }
.media-frame[data-ratio="1:1"] { aspect-ratio: 1 / 1; }

.media-frame > img,
.media-frame > picture,
.media-frame > picture > img {
  display: block;
  width: 100%;
  height: 100%;
}
.media-frame > img,
.media-frame > picture > img {
  object-fit: cover;
  filter: saturate(0.72) contrast(1.06) brightness(0.9);
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background: linear-gradient(to top, rgba(7, 21, 39, 0.94), transparent);
  pointer-events: none;
}
.media-frame__tag {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--lime);
}

/* ---------- 10. Responsive ---------- */
@media (max-width: 1179px) {
  .index-rail { display: none; }
}

@media (min-width: 1180px) {
  body { padding-inline-start: var(--rail-w); }

  .index-rail {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 140;
    width: var(--rail-w);
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 76px 0 26px;
    background: var(--ink);
    border-right: 1px solid var(--line-strong);
    pointer-events: none;
  }
}

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

  .header-tools { margin-inline-start: auto; }

  .brand__code { display: none; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: min(84vw, 320px);
    height: calc(100dvh - var(--header-h));
    margin: 0;
    padding: 24px 22px 40px;
    background: var(--moss);
    border-right: 1px solid var(--line-strong);
    overflow-y: auto;
    transform: translateX(-102%);
    visibility: hidden;
    transition: transform 0.22s var(--ease), visibility 0s linear 0.22s;
    z-index: 130;
  }
  .site-header.is-compact .site-nav { top: var(--header-h-compact); height: calc(100dvh - var(--header-h-compact)); }

  .site-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.22s var(--ease), visibility 0s linear 0s;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav__item { border-bottom: 1px solid var(--line); }
  .site-nav__link {
    display: block;
    padding: 14px 4px;
    font-size: 15px;
    white-space: normal;
  }
  .site-nav__link::after { height: 1px; }

  .header-tip {
    left: 16px;
    right: 16px;
    max-width: none;
  }

  .site-footer__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 32px;
  }
  .site-footer__brand { grid-column: 1 / -1; }

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

@media (max-width: 639px) {
  body { background-attachment: scroll; }
  .site-header__inner { gap: 12px; }
  .brand__text { font-size: 15px; }
  .btn--sm { padding: 6px 10px; font-size: 11px; }
  .grid--3,
  .grid--2 { grid-template-columns: minmax(0, 1fr); }
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); }
  .prose { font-size: 16px; }
}

@media (max-width: 400px) {
  .btn[data-fav-toggle] { display: none; }
}

@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;
    scroll-behavior: auto !important;
  }
  .scroll-meter__bar { transition: none; }
}
