/* ==========================================================================
   爱游戏赛事 · ayx-game-app.com.cn
   共享样式 /assets/site.css
   ========================================================================== */

/* 1. Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; }
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video, canvas, picture { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* 2. Tokens */
:root {
  --ink: #070C18;
  --ink-2: #0E1830;
  --panel: #16223D;
  --line: #23314F;
  --cyan: #25E6D0;
  --orange: #FF7A2F;
  --sand: #E7C583;
  --violet: #7B6BFF;
  --white: #F4F7FD;
  --mist: #9AA9C6;
  --mint: #9BF6EC;

  --rail-w: 88px;
  --rail-w-open: 232px;
  --topline-h: 26px;
  --mobile-head: 83px;

  --font-head: "Barlow Condensed", "Oswald", "Noto Sans SC", "PingFang SC", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --font-body: "Noto Sans SC", "PingFang SC", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(.22, .68, .28, 1);
}

@media (min-width: 900px) {
  :root { --topline-h: 32px; }
}

/* 3. Base typography */
body {
  min-height: 100dvh;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(34px, 6vw, 56px); }
h2 { font-size: clamp(26px, 3.6vw, 34px); }
h3 { font-size: clamp(19px, 2.2vw, 22px); }
h4 { font-size: 17px; }
p { text-wrap: pretty; }

.num,
[data-num] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.link {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(37, 230, 208, .4);
  padding-bottom: 1px;
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.link:hover { color: var(--mint); border-color: var(--mint); }

::selection { background: var(--cyan); color: var(--ink); }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 1px;
}

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

/* 4. Layout helpers */
.page-shell {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding: 32px 20px 0;
}
@media (min-width: 720px) { .page-shell { padding-inline: 32px; } }
@media (min-width: 1100px) { .page-shell { padding-inline: 40px; } }

.grid { display: grid; gap: 24px; }
.grid--two { grid-template-columns: 1fr; }
@media (min-width: 860px) {
  .grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 5. Shared chrome: skip link */
.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--cyan);
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
  transform: translateY(-180%);
  transition: transform .2s var(--ease);
}
.skip-link:focus-visible { transform: none; }

/* 6. Header shell */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  background: var(--ink-2);
  border-bottom: 1px solid var(--line);
}

body { padding-top: var(--mobile-head); }

/* 6.1 Status topline */
.topline {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 26px;
  padding: 0 12px;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--mist);
  white-space: nowrap;
  overflow: hidden;
}
.topline b { color: var(--white); font-weight: 500; }
.topline__feed { display: inline-flex; align-items: center; gap: 5px; }
.topline__sep { color: var(--line); }
.topline__season { margin-left: auto; }
.topline__pulse {
  flex: none;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 0 3px rgba(37, 230, 208, .15);
  animation: topline-pulse 2.4s ease-in-out infinite;
}
@keyframes topline-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(37, 230, 208, .15); }
  50% { opacity: .55; box-shadow: 0 0 0 6px rgba(37, 230, 208, .04); }
}
.topline__meter {
  flex: none;
  width: 44px;
  height: 3px;
  background: var(--line);
  overflow: hidden;
}
.topline__meter-fill {
  display: block;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--sand));
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* 6.2 Topbar + brand */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 56px;
  padding: 0 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.brand__mark {
  position: relative;
  flex: none;
  width: 34px; height: 34px;
  border: 1px solid rgba(37, 230, 208, .55);
  background:
    repeating-linear-gradient(118deg, rgba(37, 230, 208, .92) 0 2px, transparent 2px 8px),
    var(--ink);
  clip-path: polygon(0 0, 100% 0, 100% 70%, 70% 100%, 0 100%);
}
.brand__mark--sm { width: 32px; height: 32px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.25; }
.brand__name {
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .04em;
}
.brand__sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .16em;
  color: var(--mist);
}

/* 6.3 Nav toggle */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--mist);
  cursor: pointer;
  transition: border-color .2s var(--ease), color .2s var(--ease), background-color .2s var(--ease);
}
.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }
.nav-toggle__icon {
  position: relative;
  display: block;
  width: 18px; height: 12px;
  transition: transform .24s var(--ease);
}
.nav-toggle__icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 5px / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 10px / 100% 2px no-repeat;
  transition: opacity .2s var(--ease);
}
.site-header[data-open] .nav-toggle { border-color: var(--orange); color: var(--orange); }
.site-header[data-open] .nav-toggle__icon { transform: rotate(90deg); }

/* 6.4 Rail navigation — mobile drawer */
.rail-nav {
  position: fixed;
  top: var(--mobile-head);
  bottom: 0;
  left: 0;
  z-index: 80;
  width: min(320px, 84vw);
  display: flex;
  flex-direction: column;
  padding: 16px 16px 22px;
  background: var(--ink-2);
  border-right: 1px solid var(--line);
  box-shadow: 30px 0 80px -40px rgba(0, 0, 0, .95);
  transform: translateX(-102%);
  visibility: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: transform .3s var(--ease), visibility .3s var(--ease);
}
.site-header[data-open] .rail-nav { transform: none; visibility: visible; }

.rail-nav__list { display: flex; flex-direction: column; gap: 2px; }
.rail-nav__item { display: block; }

.rail-nav__link {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 13px 12px;
  color: var(--mist);
  text-decoration: none;
  border: 1px solid transparent;
  border-bottom-color: var(--line);
  transition: color .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}
.rail-nav__idx {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: rgba(154, 169, 198, .5);
}
.rail-nav__label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
}
.rail-nav__link:hover { color: var(--white); background: var(--panel); }
.rail-nav__link[aria-current="page"] {
  color: var(--white);
  background: linear-gradient(90deg, rgba(37, 230, 208, .14), rgba(37, 230, 208, 0) 72%);
  border-bottom-color: rgba(37, 230, 208, .5);
}
.rail-nav__link[aria-current="page"] .rail-nav__idx { color: var(--cyan); }
.rail-nav__link[aria-current="page"]::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(37, 230, 208, .8);
}

.rail-nav__foot {
  display: grid;
  gap: 8px;
  margin-top: auto;
  padding-top: 22px;
}

.rail-cta {
  display: block;
  padding: 11px 14px;
  text-align: center;
  text-decoration: none;
  color: var(--white);
  background: var(--panel);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .04em;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.rail-cta:hover { border-color: var(--cyan); background: var(--ink); }
.rail-cta--primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #1A0A02;
  font-weight: 700;
}
.rail-cta--primary:hover { background: #FF9457; border-color: #FF9457; color: #1A0A02; }

.nav-scrim {
  position: fixed;
  inset: var(--mobile-head) 0 0 0;
  z-index: 70;
  padding: 0;
  border: 0;
  background: rgba(4, 8, 16, .64);
  opacity: 0;
  visibility: hidden;
  cursor: pointer;
  transition: opacity .26s var(--ease), visibility .26s var(--ease);
}
.site-header[data-open] .nav-scrim { opacity: 1; visibility: visible; }

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

/* 7. Header — desktop rail */
@media (min-width: 900px) {
  body {
    padding-left: var(--rail-w);
    padding-top: var(--topline-h);
  }
  body.is-nav-open { overflow: visible; }

  .topline {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 95;
    height: var(--topline-h);
    padding: 0 20px;
    gap: 20px;
    font-size: 11px;
    background: var(--ink-2);
  }
  .topline__season { margin-left: 0; }
  .topline__meter { margin-left: auto; width: 180px; }

  .site-header {
    top: var(--topline-h);
    bottom: 0;
    right: auto;
    width: var(--rail-w);
    display: flex;
    flex-direction: column;
    border-bottom: 0;
    border-right: 1px solid var(--line);
    overflow: hidden;
    transition: width .3s var(--ease), box-shadow .3s var(--ease);
  }
  .site-header[data-open] {
    width: var(--rail-w-open);
    box-shadow: 28px 0 70px -34px rgba(0, 0, 0, .95);
  }

  .topbar {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    gap: 14px;
    padding: 18px 0 16px;
    border-bottom: 1px solid var(--line);
  }
  .brand { flex-direction: column; gap: 10px; }
  .brand__mark { width: 42px; height: 42px; }
  .brand__text { align-items: center; }
  .brand__name {
    writing-mode: vertical-rl;
    font-size: 15px;
    letter-spacing: .22em;
  }
  .brand__sub { display: none; }

  .nav-toggle { width: 44px; height: 38px; }

  .rail-nav {
    position: static;
    transform: none;
    visibility: visible;
    width: auto;
    flex: 1;
    min-height: 0;
    padding: 10px 8px 12px;
    background: transparent;
    border-right: 0;
    box-shadow: none;
    overflow-y: auto;
    transition: none;
  }

  .rail-nav__link {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 60px;
    padding: 8px 4px;
    border: 1px solid transparent;
    border-bottom-color: transparent;
  }
  .rail-nav__link:hover,
  .rail-nav__link:focus-visible {
    color: var(--white);
    background: var(--panel);
    border-color: rgba(37, 230, 208, .6);
    transform: translateY(-1px);
  }
  .rail-nav__link[aria-current="page"] {
    background: linear-gradient(90deg, rgba(37, 230, 208, .16), rgba(37, 230, 208, 0));
    border-bottom-color: transparent;
  }
  .rail-nav__link[aria-current="page"]::before {
    top: 16%;
    bottom: 16%;
    left: -8px;
  }
  .rail-nav__idx { font-size: 10px; }
  .rail-nav__label { font-size: 12.5px; letter-spacing: .06em; }

  .rail-nav__foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px dashed var(--line);
  }
  .rail-cta { padding: 9px 6px; font-size: 12px; }

  .site-header[data-open] .rail-nav__link {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    min-height: 0;
    padding: 11px 14px;
  }
  .site-header[data-open] .rail-nav__label { font-size: 15px; }
  .site-header[data-open] .rail-nav__idx { font-size: 11px; }
  .site-header[data-open] .rail-cta { padding: 11px 12px; font-size: 13px; }

  .nav-scrim { inset: 0; }
  .nav-scrim:hover { opacity: 1; }
}

/* 8. Footer */
.site-footer {
  position: relative;
  margin-top: 96px;
  background: var(--ink-2);
  color: var(--mist);
  border-top: 1px solid var(--line);
}
.footer-pulse {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan) 18%, var(--sand) 50%, var(--orange) 82%, transparent);
  opacity: .8;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
  max-width: 1240px;
  margin-inline: auto;
  padding: 48px 20px 40px;
}
@media (min-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1.6fr; gap: 48px; padding-inline: 32px; }
}
@media (min-width: 1100px) {
  .footer-grid { grid-template-columns: .9fr 2.1fr; gap: 72px; padding: 64px 40px 54px; }
}

.footer-brand__link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--white);
}
.footer-brand__name {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .02em;
}
.footer-brand__note {
  margin-top: 14px;
  max-width: 34ch;
  font-size: 14px;
  line-height: 1.7;
  color: var(--mist);
}

.footer-contact {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}
.footer-contact__item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: baseline;
  font-size: 13.5px;
}
.footer-contact__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--cyan);
}
.footer-contact__value {
  color: var(--white);
  overflow-wrap: anywhere;
}
.footer-contact__item--note .footer-contact__value {
  color: var(--mist);
  font-size: 12.5px;
  line-height: 1.65;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 32px 24px;
  align-content: start;
}
.footer-col__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2em;
  color: var(--sand);
}
.footer-col__title::before {
  content: "";
  width: 12px; height: 1px;
  background: var(--sand);
}
.footer-col__list { margin-top: 16px; display: grid; gap: 10px; }
.footer-col__link {
  display: inline-block;
  font-size: 14px;
  color: var(--mist);
  text-decoration: none;
  transition: color .18s var(--ease), transform .18s var(--ease);
}
.footer-col__link:hover { color: var(--white); transform: translateX(3px); }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 28px;
  max-width: 1240px;
  margin-inline: auto;
  padding: 18px 20px 30px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .06em;
  color: rgba(154, 169, 198, .8);
}
@media (min-width: 760px) { .footer-base { padding-inline: 32px; } }
@media (min-width: 1100px) { .footer-base { padding-inline: 40px; } }
.footer-base__icp { color: var(--mist); }
.footer-base__copy { color: rgba(154, 169, 198, .62); }
@media (min-width: 760px) { .footer-base__copy { margin-left: auto; } }

/* 9. Shared elements */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--cyan);
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--cyan);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--mist);
  white-space: nowrap;
}
.tag--cyan { color: var(--cyan); border-color: rgba(37, 230, 208, .45); }
.tag--sand { color: var(--sand); border-color: rgba(231, 197, 131, .45); }
.tag--orange { color: var(--orange); border-color: rgba(255, 122, 47, .5); }
.tag--violet { color: var(--violet); border-color: rgba(123, 107, 255, .5); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #1A0A02;
  font-weight: 700;
}
.btn--primary:hover { background: #FF9457; border-color: #FF9457; }
.btn--ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--mist);
}
.btn--ghost:hover { border-color: var(--cyan); color: var(--white); }

.breadcrumbs { padding-block: 4px 0; }
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--mist);
}
.breadcrumbs__item { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs__item + .breadcrumbs__item::before {
  content: "/";
  color: var(--line);
}
.breadcrumbs__link { color: var(--mist); text-decoration: none; }
.breadcrumbs__link:hover { color: var(--cyan); }
.breadcrumbs__item[aria-current="page"] { color: var(--white); }

.panel {
  position: relative;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: -6px 6px 0 0 rgba(35, 49, 79, .45);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%);
}

.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 20px), calc(100% - 20px) 100%, 0 100%);
}
.media-frame img,
.media-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.82) contrast(1.06) brightness(.9);
}
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 12, 24, 0) 42%, rgba(7, 12, 24, .78) 100%);
}
.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame__caption {
  position: absolute;
  left: 14px; right: 14px; bottom: 12px;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--mist);
}

/* 10. Reveal */
.has-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.has-reveal [data-reveal="in"] {
  opacity: 1;
  transform: none;
}

/* 11. Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .has-reveal [data-reveal] { opacity: 1; transform: none; }
}
