/* ============================================================
   cloud-somersault-sports.com.cn — 共享样式表 /assets/site.css
   东方赛博·腾云竞技
   ============================================================ */

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

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

body,
h1, h2, h3, h4,
p, figure, dl, dd, blockquote { margin: 0; }

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

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

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

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

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

/* ---------- tokens ---------- */
:root {
  --ink: #0B0D10;
  --ink-soft: #141920;
  --paper: #F4EFE4;
  --paper-2: #EAE3D4;
  --stone: #6E7378;
  --gold: #D9A62E;
  --ember: #F0552A;
  --jade: #2E7F8C;
  --moss: #4F6B4A;
  --clay: #B4644A;
  --neon: #7CFF6B;
  --violet: #7A5CF0;
  --cloud: rgba(255, 255, 255, 0.14);
  --ink-line: rgba(11, 13, 16, 0.14);

  --font-display: "Source Han Sans SC", "HarmonyOS Sans SC", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, "Cascadia Mono",
    "Roboto Mono", Consolas, "Courier New", monospace;

  --radius: 4px;
  --radius-lg: 14px;
  --shell: min(1220px, 100% - 2.25rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --arc: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- base ---------- */
html.site-js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
}

html.site-js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.42s var(--ease),
    transform 0.42s var(--ease);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.01em;
  color: var(--ink);
  background-color: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.4rem, 6vw, 5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 1.7vw, 1.55rem); }
h4 { font-size: 1.0625rem; }

strong { font-weight: 700; }

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

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

/* ---------- layout ---------- */
.shell {
  width: var(--shell);
  margin-inline: auto;
}

.page-body {
  background-color: var(--paper);
  color: var(--ink);
  padding-block: clamp(2rem, 5vw, 4.25rem);
}

.section {
  padding-block: clamp(2.75rem, 6vw, 5.5rem);
}

.section__head {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.section__lede {
  max-width: 46ch;
  font-size: 1.0625rem;
  color: var(--stone);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay);
}

.prose {
  max-width: 68ch;
}

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

.prose p {
  max-width: 44ch;
}

.prose a {
  color: var(--jade);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.prose a:hover {
  color: var(--ember);
}

.grid {
  display: grid;
  gap: clamp(1rem, 2.4vw, 1.75rem);
}

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

/* ---------- skip link ---------- */
.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 400;
  padding: 0.7rem 1.1rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--ink);
  background-color: var(--gold);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.9);
  transform: translateY(-220%);
  transition: transform 0.2s var(--ease);
}

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

/* ---------- header : rail ---------- */
.site-header {
  position: relative;
  z-index: 80;
}

.rail {
  background-color: var(--ink);
  color: rgba(244, 239, 228, 0.7);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--cloud);
}

.rail__inner {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
  min-height: 36px;
  padding-block: 0.4rem;
}

.rail__brand {
  color: var(--gold);
  white-space: nowrap;
}

.rail__pulse {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.rail__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--neon);
  box-shadow: 0 0 10px rgba(124, 255, 107, 0.9);
  animation: railPulse 2.4s ease-in-out infinite;
}

.rail__search {
  color: rgba(244, 239, 228, 0.5);
  white-space: nowrap;
}

.rail__lang {
  margin-left: auto;
  color: rgba(244, 239, 228, 0.85);
  white-space: nowrap;
}

@keyframes railPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.72); }
}

/* ---------- header : beam ---------- */
.beam {
  position: sticky;
  top: 0;
  z-index: 70;
  background-color: rgba(244, 239, 228, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ink-line);
  transition: box-shadow 0.3s var(--ease), background-color 0.3s var(--ease);
}

.beam::after {
  content: "";
  position: absolute;
  inset: 0 0 -1px 0;
  height: 2px;
  pointer-events: none;
  background: linear-gradient(90deg, var(--gold) 0%, var(--ember) 38%, var(--clay) 66%, var(--jade) 100%);
  opacity: 0.55;
}

.beam.is-stuck {
  background-color: rgba(244, 239, 228, 0.99);
  box-shadow: 0 20px 44px -30px rgba(11, 13, 16, 0.85);
}

.beam__inner {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 2.25rem);
  min-height: 66px;
  padding-block: 0.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 auto;
}

.brand__mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--ink);
  border: 2px solid var(--gold);
  flex: 0 0 auto;
}

.brand__mark::before {
  content: "";
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--gold);
  box-shadow: 0 0 9px rgba(217, 166, 46, 0.75);
  transform: rotate(-45deg);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.12;
}

.brand__name {
  font-size: 1.0625rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.brand__sub {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--stone);
}

/* ---------- header : nav ---------- */
.nav {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(0.1rem, 1.1vw, 0.9rem);
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 0.4rem;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
  border-radius: var(--radius);
  transition: color 0.2s var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  bottom: 0.3rem;
  height: 2px;
  border-radius: 2px;
  background-color: var(--gold);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.34s var(--ease), background-color 0.2s var(--ease);
}

.nav__link:hover {
  color: var(--clay);
}

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

.nav__link[aria-current="page"] {
  color: var(--clay);
}

.nav__link[aria-current="page"]::after {
  background-color: var(--ember);
  transform: scaleX(1);
}

.beam__tools {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
}

/* ---------- header : toggle ---------- */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--ink);
  background-color: transparent;
  border: 1px solid rgba(11, 13, 16, 0.22);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.24s var(--ease), color 0.24s var(--ease), border-color 0.24s var(--ease);
}

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--ink);
  transition: background-color 0.24s var(--ease);
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--ink);
  transition: transform 0.3s var(--ease), background-color 0.24s var(--ease), top 0.3s var(--ease);
}

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

.nav-toggle[aria-expanded="true"] {
  color: var(--paper);
  background-color: var(--ink);
  border-color: var(--ink);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars {
  background-color: transparent;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  top: 0;
  background-color: var(--gold);
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  top: 0;
  background-color: var(--gold);
  transform: rotate(-45deg);
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.35rem;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  background-color: transparent;
  transition: transform 0.24s var(--ease), background-color 0.24s var(--ease),
    color 0.24s var(--ease), border-color 0.24s var(--ease), box-shadow 0.24s var(--ease);
}

.btn--primary {
  color: #fff;
  background-color: var(--ember);
  box-shadow: 0 12px 26px -16px rgba(240, 85, 42, 0.95);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px -18px rgba(240, 85, 42, 1);
}

.btn--gold {
  color: var(--ink);
  background-color: var(--gold);
  box-shadow: 0 12px 26px -18px rgba(217, 166, 46, 0.9);
}

.btn--gold:hover {
  transform: translateY(-2px);
}

.btn--ghost {
  color: var(--gold);
  border-color: rgba(217, 166, 46, 0.6);
}

.btn--ghost:hover {
  color: var(--ink);
  background-color: var(--gold);
  border-color: var(--gold);
}

.btn--quiet {
  color: var(--ink);
  border-color: rgba(11, 13, 16, 0.24);
}

.btn--quiet:hover {
  color: var(--paper);
  background-color: var(--ink);
  border-color: var(--ink);
}

/* ---------- breadcrumb ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--stone);
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li::after {
  content: "/";
  color: rgba(110, 115, 120, 0.55);
}

.breadcrumb li:last-child::after { content: ""; }

.breadcrumb a {
  color: var(--jade);
  border-bottom: 1px solid transparent;
}

.breadcrumb a:hover {
  border-bottom-color: var(--jade);
}

/* ---------- figure ---------- */
.figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  aspect-ratio: 16 / 9;
  background-color: var(--ink-soft);
  background-image: linear-gradient(135deg, rgba(11, 13, 16, 0.96), rgba(46, 127, 140, 0.45));
}

.figure::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 38px 38px;
  mix-blend-mode: screen;
}

.figure__media {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.figure__caption {
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--stone);
}

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

.figure--arc {
  border-radius: 50% 50% var(--radius) var(--radius) / 16% 16% var(--radius) var(--radius);
}

/* ---------- tag / number ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--clay);
  background-color: rgba(180, 100, 74, 0.14);
  border: 1px solid rgba(180, 100, 74, 0.36);
  border-radius: 999px;
}

.tag--live {
  color: var(--ember);
  background-color: rgba(240, 85, 42, 0.13);
  border-color: rgba(240, 85, 42, 0.4);
}

.tag--cool {
  color: var(--jade);
  background-color: rgba(46, 127, 140, 0.13);
  border-color: rgba(46, 127, 140, 0.42);
}

.tag--ok {
  color: var(--moss);
  background-color: rgba(79, 107, 74, 0.14);
  border-color: rgba(79, 107, 74, 0.4);
}

.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------- dark slab ---------- */
.slab {
  position: relative;
  color: rgba(244, 239, 228, 0.82);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
}

.slab h1,
.slab h2,
.slab h3,
.slab h4 {
  color: var(--paper);
}

.slab .section__lede { color: rgba(244, 239, 228, 0.62); }

.slab .prose a { color: var(--gold); }

/* ---------- footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  color: rgba(244, 239, 228, 0.78);
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--ember) 46%, var(--clay) 100%);
}

.site-footer::after {
  content: "";
  position: absolute;
  left: -12%;
  top: -150%;
  width: 124%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid var(--cloud);
  box-shadow:
    0 0 0 88px rgba(217, 166, 46, 0.035),
    0 0 0 178px rgba(46, 127, 140, 0.03);
  pointer-events: none;
}

.footer__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding-block: clamp(2.75rem, 6vw, 4.5rem);
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  max-width: 34ch;
}

.footer__signature {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.5rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--gold);
  line-height: 1.3;
}

.footer__note {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: rgba(244, 239, 228, 0.56);
}

.footer__cta {
  margin-top: 0.35rem;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.footer__heading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--jade);
}

.footer__list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer__link {
  display: inline-block;
  font-size: 0.9375rem;
  color: rgba(244, 239, 228, 0.78);
  border-bottom: 1px solid transparent;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}

.footer__link:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.footer__legal {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1.75rem;
  padding-block: 1.35rem;
  border-top: 1px solid var(--cloud);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  color: rgba(244, 239, 228, 0.55);
}

.footer__copyright,
.footer__icp,
.footer__contact {
  max-width: 100%;
}

.footer__contact {
  flex: 1 1 22rem;
  text-align: right;
}

/* ---------- responsive ---------- */
@media (max-width: 1140px) {
  .beam__cta { display: none; }
}

@media (max-width: 1000px) {
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .rail__inner {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-block: 0.45rem;
  }

  .rail__inner::-webkit-scrollbar { display: none; }

  .rail__lang { margin-left: 0; }

  .beam__inner {
    min-height: 60px;
    justify-content: space-between;
  }

  .nav {
    position: absolute;
    inset: 100% 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
    padding: 0.75rem 1.125rem 1.5rem;
    max-height: min(72vh, 540px);
    overflow-y: auto;
    background-color: var(--ink);
    border-top: 2px solid var(--gold);
    box-shadow: 0 30px 56px -34px rgba(0, 0, 0, 0.95);
    z-index: 65;
  }

  .nav[data-open] {
    display: flex;
    animation: cloudDrop 0.34s var(--ease) both;
  }

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

  .nav__link {
    width: 100%;
    justify-content: space-between;
    padding: 0.9rem 0.25rem;
    font-size: 1.0625rem;
    color: var(--paper);
    border-bottom: 1px solid var(--cloud);
    border-radius: 0;
  }

  .nav__link::after { display: none; }

  .nav__link:hover { color: var(--gold); }

  .nav__link[aria-current="page"] {
    color: var(--gold);
    padding-left: 0.85rem;
    box-shadow: inset 3px 0 0 var(--ember);
  }

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

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

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

  .footer__brand { grid-column: 1 / -1; max-width: 44ch; }

  .footer__contact { text-align: left; }
}

@media (max-width: 620px) {
  :root { --shell: min(1220px, 100% - 1.5rem); }

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

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

  .brand__sub { display: none; }

  .breadcrumb { font-size: 0.75rem; }
}

@keyframes cloudDrop {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

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

  html.site-js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .rail__dot { animation: none; }
}
