/* ============================================================
   /assets/site.css — 电玩平台中文站 共享样式
   ============================================================ */

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li, figure, figcaption, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

ul, ol { list-style: none; }

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

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

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

table { border-collapse: collapse; width: 100%; }

/* ---------- tokens ---------- */
:root {
  --void:   #060914;
  --deck:   #0E1730;
  --cyan:   #25F4D4;
  --purple: #8F6BFF;
  --amber:  #FFB020;
  --lime:   #B6FF3B;
  --ice:    #EAF6FF;
  --steel:  #8391AD;
  --coral:  #FF5D7A;
  --edge:   #24365C;

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

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-cut: 2px 20px 2px 2px;
  --shadow-lift: 0 24px 48px -28px rgba(0, 0, 0, .92);
  --ease: cubic-bezier(.22, .72, .28, 1);
}

/* ---------- base ---------- */
body {
  min-height: 100vh;
  background-color: var(--void);
  background-image:
    radial-gradient(58rem 40rem at 10% -8%, rgba(37, 244, 212, .10), transparent 62%),
    radial-gradient(52rem 38rem at 94% 6%, rgba(143, 107, 255, .13), transparent 62%),
    radial-gradient(40rem 30rem at 50% 118%, rgba(255, 176, 32, .07), transparent 66%);
  background-repeat: no-repeat;
  color: var(--ice);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.015em;
  color: var(--ice);
  text-wrap: balance;
}

p { text-wrap: pretty; }

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

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 999;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--void);
  background: var(--cyan);
  border-radius: 2px 12px 2px 2px;
  transform: translateY(-160%);
  transition: transform .18s var(--ease);
}

.skip-link:focus-visible,
.skip-link:focus {
  transform: translateY(0);
  outline-offset: 2px;
}

/* ---------- layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  gap: clamp(16px, 2.4vw, 28px);
}

.grid--2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.prose {
  max-width: 68ch;
  color: var(--ice);
}

.prose p + p { margin-top: 1em; }

.prose h2 {
  margin-top: 1.8em;
  font-size: clamp(22px, 3vw, 30px);
}

.prose h3 {
  margin-top: 1.4em;
  font-size: clamp(18px, 2.2vw, 22px);
}

.prose ul, .prose ol {
  margin-top: .8em;
  padding-left: 1.2em;
  list-style: disc;
}

.prose li + li { margin-top: .4em; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(6, 9, 20, .92);
  border-bottom: 1px solid var(--edge);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.header-rail {
  height: 2px;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--purple) 44%, rgba(36, 54, 92, .35) 82%, transparent 100%);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  min-height: 72px;
}

/* brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  color: #041613;
  background: linear-gradient(135deg, var(--cyan), var(--lime));
  clip-path: polygon(0 0, 100% 0, 100% 70%, 82% 100%, 0 100%);
}

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

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--ice);
  white-space: nowrap;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: .66rem;
  letter-spacing: .14em;
  color: var(--steel);
  white-space: nowrap;
}

/* nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.6vw, 26px);
  margin-left: auto;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(2px, 1.2vw, 20px);
}

.nav-item { flex: 0 0 auto; }

.nav-link {
  position: relative;
  display: inline-block;
  padding: 9px 2px;
  font-size: .93rem;
  font-weight: 500;
  color: rgba(234, 246, 255, .84);
  white-space: nowrap;
  transition: color .2s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .24s var(--ease);
}

.nav-link:hover,
.nav-link:focus-visible { color: var(--cyan); }

.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }

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

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(37, 244, 212, .7);
}

/* CTA in header */
.header-cta {
  flex: 0 0 auto;
  font-size: .88rem;
  padding: .62em 1.15em;
  white-space: nowrap;
}

/* toggle */
.nav-toggle {
  display: none;
  position: relative;
  margin-left: auto;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 1px solid var(--edge);
  border-radius: 2px 14px 2px 2px;
  background: rgba(36, 54, 92, .22);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  border-color: var(--cyan);
  background: rgba(37, 244, 212, .10);
}

.nav-toggle-bars {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 18px;
  height: 2px;
  margin: -1px 0 0 -9px;
  background: var(--ice);
  border-radius: 1px;
  transition: background .2s var(--ease);
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--ice);
  border-radius: 1px;
  transition: transform .24s var(--ease), top .24s var(--ease), background .2s var(--ease);
}

.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top: 6px; }

.site-header[data-open="true"] .nav-toggle-bars { background: transparent; }

.site-header[data-open="true"] .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
  background: var(--cyan);
}

.site-header[data-open="true"] .nav-toggle-bars::after {
  top: 0;
  transform: rotate(-45deg);
  background: var(--cyan);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: .74em 1.35em;
  font-family: var(--font-body);
  font-size: .95rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: .01em;
  border: 1px solid transparent;
  border-radius: 2px 16px 2px 2px;
  transition: transform .2s var(--ease), background .2s var(--ease),
              color .2s var(--ease), border-color .2s var(--ease),
              box-shadow .2s var(--ease);
}

.btn--primary {
  color: #160f02;
  background: var(--amber);
  box-shadow: 0 0 0 1px rgba(255, 176, 32, .38), 0 12px 26px -14px rgba(255, 176, 32, .92);
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: #ffc247;
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(255, 176, 32, .72), 0 18px 32px -16px rgba(255, 176, 32, .95);
}

.btn--cyan {
  color: var(--cyan);
  border-color: rgba(37, 244, 212, .55);
  background: rgba(37, 244, 212, .07);
}

.btn--cyan:hover,
.btn--cyan:focus-visible {
  color: var(--void);
  background: var(--cyan);
  border-color: var(--cyan);
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--ice);
  border-color: var(--edge);
  background: rgba(14, 23, 48, .6);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
  color: var(--cyan);
  border-color: var(--cyan);
  transform: translateY(-2px);
}

/* ---------- labels / tags ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65em;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: currentColor;
}

.tag {
  display: inline-block;
  padding: .26em .7em;
  font-family: var(--font-mono);
  font-size: .7rem;
  letter-spacing: .12em;
  line-height: 1.5;
  color: var(--steel);
  border: 1px solid var(--edge);
  border-radius: 2px 10px 2px 2px;
  background: rgba(36, 54, 92, .22);
}

.tag--cyan   { color: #041613; background: var(--cyan);   border-color: var(--cyan); }
.tag--purple { color: #0b0618; background: var(--purple); border-color: var(--purple); }
.tag--amber  { color: #160f02; background: var(--amber);  border-color: var(--amber); }
.tag--lime   { color: #0a1400; background: var(--lime);   border-color: var(--lime); }
.tag--coral  { color: #1b0308; background: var(--coral);  border-color: var(--coral); }

/* ---------- surfaces ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 28px);
  background: linear-gradient(160deg, rgba(14, 23, 48, .96), rgba(6, 9, 20, .9));
  border: 1px solid var(--edge);
  border-radius: var(--radius-cut);
  box-shadow: var(--shadow-lift);
}

.card--tilt { transform: rotate(-1.2deg); }

.panel {
  padding: clamp(16px, 2.2vw, 26px);
  background: rgba(14, 23, 48, .68);
  border: 1px solid var(--edge);
  border-radius: var(--radius-cut);
}

.rail {
  position: relative;
  padding-left: 38px;
}

.rail::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--cyan), var(--purple));
  opacity: .75;
}

/* ---------- breadcrumb ---------- */
.breadcrumb {
  padding-block: clamp(18px, 3vw, 30px) 0;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .08em;
  color: var(--steel);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55em;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  margin-right: .55em;
  color: var(--edge);
}

.breadcrumb-link {
  color: var(--steel);
  transition: color .2s var(--ease);
}

.breadcrumb-link:hover,
.breadcrumb-link:focus-visible { color: var(--cyan); }

.breadcrumb-item[aria-current="page"] { color: var(--ice); }

/* ---------- media frames (image placeholders) ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  width: 100%;
  background:
    linear-gradient(140deg, rgba(37, 244, 212, .16), rgba(143, 107, 255, .20) 55%, rgba(6, 9, 20, .92));
  border: 1px solid var(--edge);
  border-radius: var(--radius-cut);
}

.media-frame--wide { aspect-ratio: 21 / 9; }
.media-frame--tall { aspect-ratio: 3 / 4; }
.media-frame--square { aspect-ratio: 1 / 1; }

.media-frame img,
.media-frame picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.media-frame__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

.media-frame__caption {
  margin-top: .65rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .06em;
  color: var(--steel);
}

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  width: 0;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--cyan), var(--purple) 55%, var(--amber));
  box-shadow: 0 0 12px rgba(37, 244, 212, .55);
}

/* ---------- reveal ---------- */
html[data-reveal-ready] [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}

html[data-reveal-ready] [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(64px, 10vw, 140px);
  background: linear-gradient(180deg, rgba(6, 9, 20, .4), var(--deck) 42%, #0a1224 100%);
  border-top: 1px solid var(--edge);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple) 22%, var(--cyan) 62%, transparent);
  opacity: .8;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 72px) clamp(32px, 4vw, 52px);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.brand--footer { gap: 10px; }

.brand--footer .brand-mark {
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.brand--footer .brand-name {
  font-size: .98rem;
  letter-spacing: .04em;
}

.footer-blurb {
  max-width: 34ch;
  font-size: .9rem;
  line-height: 1.75;
  color: var(--steel);
}

.footer-service {
  font-size: .84rem;
  color: var(--ice);
}

.footer-service .mono {
  color: var(--cyan);
  letter-spacing: .01em;
}

.footer-note {
  max-width: 36ch;
  font-size: .78rem;
  line-height: 1.7;
  color: var(--steel);
}

.footer-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  min-width: 0;
}

.footer-group { min-width: 0; }

.footer-group-title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cyan);
}

.footer-links {
  display: grid;
  gap: 10px;
}

.footer-item { min-width: 0; }

.footer-link {
  position: relative;
  display: inline-block;
  padding-left: 0;
  font-size: .9rem;
  color: rgba(234, 246, 255, .82);
  transition: color .2s var(--ease), padding-left .2s var(--ease);
}

.footer-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 0;
  height: 2px;
  background: var(--cyan);
  transform: translateY(-50%);
  transition: width .2s var(--ease);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--cyan);
  padding-left: 14px;
}

.footer-link:hover::before,
.footer-link:focus-visible::before { width: 9px; }

.footer-link--sm { font-size: .8rem; color: var(--steel); }

.footer-contact { min-width: 0; }

.contact-list {
  display: grid;
  gap: 14px;
}

.contact-item {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.contact-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--steel);
}

.contact-value {
  font-size: .86rem;
  line-height: 1.6;
  color: var(--ice);
  overflow-wrap: anywhere;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding-block: 18px;
  border-top: 1px solid var(--edge);
}

.legal-line {
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .04em;
  color: var(--steel);
}

.legal-icp { color: rgba(131, 145, 173, .92); }

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  align-items: center;
}

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .brand-tagline { display: none; }

  .nav-toggle { display: inline-block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    padding: 8px var(--gutter) 24px;
    background: linear-gradient(180deg, #0b1329, var(--deck));
    border-bottom: 1px solid var(--edge);
    box-shadow: 0 26px 52px -18px rgba(0, 0, 0, .9);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .site-header[data-open="true"] .site-nav { display: flex; }

  .site-header[data-open="true"] .site-nav .nav-item {
    animation: nav-item-in .26s var(--ease) both;
  }

  .site-header[data-open="true"] .site-nav .nav-item:nth-child(1) { animation-delay: .02s; }
  .site-header[data-open="true"] .site-nav .nav-item:nth-child(2) { animation-delay: .05s; }
  .site-header[data-open="true"] .site-nav .nav-item:nth-child(3) { animation-delay: .08s; }
  .site-header[data-open="true"] .site-nav .nav-item:nth-child(4) { animation-delay: .11s; }
  .site-header[data-open="true"] .site-nav .nav-item:nth-child(5) { animation-delay: .14s; }
  .site-header[data-open="true"] .site-nav .nav-item:nth-child(6) { animation-delay: .17s; }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav-item { display: block; }

  .nav-link {
    display: block;
    padding: 15px 0;
    font-size: 1.02rem;
    border-bottom: 1px solid var(--edge);
  }

  .nav-link::after {
    left: 0;
    right: auto;
    bottom: -1px;
    width: 46px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left center;
  }

  .nav-link[aria-current="page"]::after { transform: scaleX(1); }

  .header-cta {
    margin-top: 20px;
    width: 100%;
    padding-block: .86em;
    font-size: .95rem;
  }
}

@keyframes nav-item-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 1000px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-blurb, .footer-note { max-width: 52ch; }
}

@media (max-width: 720px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  .footer-groups { grid-template-columns: minmax(0, 1fr); gap: 26px; }

  .footer-legal {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .header-inner { min-height: 64px; }

  .brand-mark { width: 34px; height: 34px; font-size: 11px; }
}

@media (max-width: 420px) {
  .legal-links { gap: 6px 16px; }
}

/* ---------- motion preferences ---------- */
@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;
  }

  html[data-reveal-ready] [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .btn:hover,
  .btn:focus-visible,
  .footer-link:hover,
  .footer-link:focus-visible { transform: none; }
}
