/* ============================================================
   米乐赛事 · Site Kit / assets/site.css
   ============================================================ */

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

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

body,
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 { display: block; max-width: 100%; }

a { color: inherit; }

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

button { border: 0; background: none; }

[hidden] { display: none !important; }

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #06121F;
  --panel: #0E2136;
  --panel-soft: rgba(14, 33, 54, 0.72);
  --line: #1C3A52;
  --cyan: #2FE3C6;
  --cyan-soft: rgba(47, 227, 198, 0.12);
  --indigo: #6C5CE7;
  --amber: #FFB13C;
  --paper: #F4F7FA;
  --ink: #0B0B0D;
  --text: #D7E3EE;
  --muted: #8CA2B8;
  --ok: #3FD98B;
  --warn: #FF6B6B;

  --r-xl: 32px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-pill: 999px;

  --shell: 1440px;
  --rail: 240px;
  --gutter: 24px;
  --grid-cell: 24px;

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

/* ---------- 2. Base / typography ---------- */
body {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(215, 227, 238, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(215, 227, 238, 0.035) 1px, transparent 1px),
    radial-gradient(1100px 560px at 84% -8%, rgba(47, 227, 198, 0.10), transparent 62%),
    radial-gradient(900px 520px at -4% 14%, rgba(108, 92, 231, 0.13), transparent 66%);
  background-size: var(--grid-cell) var(--grid-cell), var(--grid-cell) var(--grid-cell), auto, auto;
  background-repeat: repeat, repeat, no-repeat, no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--paper);
  font-stretch: condensed;
}

h1 { font-size: clamp(40px, 5.6vw, 56px); line-height: 0.98; letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 3.4vw, 40px); }
h3 { font-size: 22px; line-height: 1.15; }
h4 { font-size: 18px; line-height: 1.2; }

p { max-width: 68ch; text-wrap: pretty; }

strong { color: var(--paper); font-weight: 600; }

::selection { background: var(--cyan); color: #04141b; }

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

/* ---------- 3. Utilities ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 50%;
  z-index: 200;
  transform: translate(-50%, -160%);
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--cyan);
  color: #04141b;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.22s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.skip-link:focus-visible { transform: translate(-50%, 0); }

.container {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 32px);
}

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

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--cyan);
  flex: 0 0 auto;
}

.divider {
  height: 1px;
  border: 0;
  margin-block: clamp(24px, 4vw, 48px);
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.18s ease,
    border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.btn--primary {
  background: var(--cyan);
  color: #04141b;
  box-shadow: 0 14px 30px -20px var(--cyan);
}

.btn--primary:hover {
  background: #5cf0d9;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px -18px rgba(47, 227, 198, 0.7);
}

.btn--ghost {
  border-color: var(--line);
  background: rgba(215, 227, 238, 0.04);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-1px);
}

.btn--sm { padding: 9px 17px; font-size: 13px; }

.btn--block { width: 100%; }

/* ---------- 5. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  padding: 14px clamp(12px, 2vw, 28px) 0;
}

.header-shell {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: var(--shell);
  min-height: 60px;
  margin-inline: auto;
  padding: 9px 10px 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(10, 26, 42, 0.74);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 24px 48px -32px rgba(0, 0, 0, 0.95);
  transition: min-height 0.26s ease, padding 0.26s ease, background-color 0.26s ease;
}

.site-header[data-scrolled="true"] .header-shell {
  min-height: 52px;
  padding-block: 5px;
  background: rgba(6, 18, 31, 0.93);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--text);
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: var(--cyan);
  color: #04141b;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 0 0 1px rgba(47, 227, 198, 0.4), 0 10px 22px -14px var(--cyan);
}

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

.brand__name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: var(--paper);
}

.brand__tagline {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.nav {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav__link:hover { color: var(--text); background: rgba(215, 227, 238, 0.07); }

.nav__link[aria-current="page"] {
  background: var(--cyan);
  color: #04141b;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: none;
  padding: 5px 11px;
  border: 1px solid rgba(255, 177, 60, 0.32);
  border-radius: var(--r-pill);
  background: rgba(255, 177, 60, 0.08);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.header-status__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(63, 217, 139, 0.18);
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(215, 227, 238, 0.05);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}

.nav-toggle:hover { border-color: var(--cyan); color: var(--cyan); }

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
}

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

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

/* ---------- 6. Mobile dock ---------- */
.mobile-dock { display: none; }

/* ---------- 7. Footer ---------- */
.site-footer {
  position: relative;
  z-index: 10;
  margin-top: clamp(64px, 9vw, 120px);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(900px 320px at 10% 0%, rgba(47, 227, 198, 0.09), transparent 70%),
    linear-gradient(180deg, rgba(14, 33, 54, 0.85) 0%, rgba(6, 18, 31, 1) 84%);
}

.footer-shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding: clamp(48px, 6vw, 80px) clamp(16px, 3vw, 32px) 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(240px, 1.05fr) 2fr;
  gap: clamp(32px, 5vw, 72px);
}

.brand--footer .brand__mark { width: 34px; height: 34px; border-radius: 11px; }

.footer-brand__lead {
  margin-top: 18px;
  max-width: 34ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.footer-brand__meta {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--amber);
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-nav__title {
  margin-bottom: 14px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--muted);
}

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

.footer-nav__list a {
  position: relative;
  display: inline-block;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: color 0.18s ease;
}

.footer-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--cyan);
  transition: width 0.2s ease;
}

.footer-nav__list a:hover { color: var(--cyan); }
.footer-nav__list a:hover::after { width: 100%; }

.footer-contact {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 22px 40px;
  align-items: center;
  margin-top: clamp(36px, 5vw, 56px);
  padding: clamp(20px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: rgba(14, 33, 54, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.footer-contact__grid { display: grid; gap: 12px; }

.footer-contact__item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
}

.footer-contact__item dt {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.footer-contact__item dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--text);
  word-break: break-word;
}

.footer-contact__note {
  max-width: 40ch;
  padding-left: 14px;
  border-left: 2px solid var(--amber);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  margin-top: 32px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.footer-copy,
.footer-legal { max-width: none; letter-spacing: 0.02em; }
.footer-legal { color: rgba(140, 162, 184, 0.85); }

/* ---------- 8. Pills / chips / numbers ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(244, 247, 250, 0.06);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.pill--cyan {
  border-color: rgba(47, 227, 198, 0.42);
  background: var(--cyan-soft);
  color: var(--cyan);
}

.pill--indigo {
  border-color: rgba(108, 92, 231, 0.45);
  background: rgba(108, 92, 231, 0.16);
  color: #bdb6ff;
}

.pill--amber {
  border-color: rgba(255, 177, 60, 0.42);
  background: rgba(255, 177, 60, 0.11);
  color: var(--amber);
}

.score-chip {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.score-chip--dark {
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--line);
}

.data-number {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--amber);
  font-variant-numeric: tabular-nums;
}

.data-number--muted { color: var(--text); }

/* ---------- 9. Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.breadcrumbs li { display: inline-flex; align-items: center; gap: 8px; }

.breadcrumbs li + li::before {
  content: "/";
  color: var(--line);
}

.breadcrumbs a { color: var(--muted); text-decoration: none; transition: color 0.16s ease; }
.breadcrumbs a:hover { color: var(--cyan); }
.breadcrumbs [aria-current="page"] { color: var(--text); }

/* ---------- 10. Cards ---------- */
.card {
  position: relative;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(165deg, rgba(14, 33, 54, 0.92), rgba(6, 18, 31, 0.92));
  transition: border-color 0.18s ease, transform 0.18s ease;
}

.card:hover { border-color: rgba(47, 227, 198, 0.4); }

.card--glass {
  background: rgba(14, 33, 54, 0.6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

/* ---------- 11. Media placeholders ---------- */
.media {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--r-lg);
  background: linear-gradient(150deg, #102842 0%, #0a1a2b 55%, #06121f 100%);
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(47, 227, 198, 0.16), transparent 46%, rgba(108, 92, 231, 0.22));
  mix-blend-mode: screen;
}

.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--hero { aspect-ratio: 16 / 9; }
.media--wide { aspect-ratio: 21 / 9; }
.media--card { aspect-ratio: 4 / 3; }
.media--square { aspect-ratio: 1 / 1; }

.media__tag {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
}

.media__caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  right: 16px;
  z-index: 2;
  color: var(--paper);
  font-size: 13px;
  line-height: 1.5;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

/* ---------- 12. Filters ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(244, 247, 250, 0.04);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.filter-btn:hover { color: var(--text); border-color: rgba(47, 227, 198, 0.45); }

.filter-btn[aria-pressed="true"] {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #04141b;
  font-weight: 600;
}

.is-filtered-in { animation: mk-filter-in 0.16s ease both; }

@keyframes mk-filter-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 13. Reveal ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

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

/* ---------- 14. Responsive ---------- */
@media (max-width: 1180px) {
  .header-actions .btn--ghost { display: none; }
}

@media (max-width: 1080px) {
  .header-shell { gap: 12px; }

  .nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: block;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: rgba(8, 22, 36, 0.97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    box-shadow: 0 32px 60px -34px #000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  .nav[data-open="true"] {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

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

  .nav__link {
    padding: 12px 15px;
    border-radius: 16px;
    font-size: 15px;
  }

  .header-actions { margin-left: auto; }
  .nav-toggle { display: inline-flex; }
  .header-status { display: none; }

  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .footer-contact { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .grid-12 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  body { padding-bottom: 88px; }

  .site-header { padding-top: 10px; }
  .header-shell { min-height: 54px; padding-left: 12px; }
  .brand__tagline { display: none; }
  .brand__name { font-size: 16px; }

  .mobile-dock {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 90;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: rgba(10, 26, 42, 0.92);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    box-shadow: 0 22px 40px -24px #000;
  }

  .mobile-dock__link {
    display: block;
    padding: 11px 12px;
    border-radius: var(--r-pill);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
  }

  .mobile-dock__link:first-child {
    background: var(--cyan);
    color: #04141b;
  }

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

  .footer-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }

  .footer-contact__item { grid-template-columns: 44px minmax(0, 1fr); gap: 10px; }

  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .media--wide { aspect-ratio: 16 / 10; }
}

@media (max-width: 480px) {
  .footer-nav { grid-template-columns: 1fr; }
  .nav-toggle__label { display: none; }
  .btn--sm { padding: 9px 14px; }
  .data-number { font-size: clamp(32px, 9vw, 44px); }
}

/* ---------- 15. 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;
  }

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