/* ==========================================================================
   LUCKY赛事 · /assets/site.css
   共享外壳：reset / 变量 / 中文排版 / 头部 / 页脚 / 通用组件 / 响应式
   ========================================================================== */

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

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

body {
  margin: 0;
  min-height: 100%;
}

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

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

a { color: inherit; }

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

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

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 0;
}

/* ---------- 2. Tokens ---------- */
:root {
  --deep: #062A3A;
  --deep-2: #04202D;
  --ice: #0B6E99;
  --ice-mid: #1E8FB8;
  --mist: #DDF4FB;
  --frost: #F4FBFC;
  --cyan: #00E5C3;
  --ember: #FF6B35;
  --ember-soft: #FFB38F;
  --ink: #0E1B22;
  --mute: #6B8794;
  --line: #A9D8E8;

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

  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius-s: 10px;
  --radius-m: 20px;
  --radius-l: 36px;
  --beat: clamp(52px, 7vw, 104px);
}

/* ---------- 3. Base typography ---------- */
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--frost);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0.04em;
  margin: 0;
  color: inherit;
  text-wrap: balance;
}

h1 {
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1.04;
  letter-spacing: 0.02em;
}

h2 { font-size: clamp(28px, 4vw, 46px); }
h3 { font-size: clamp(20px, 2.4vw, 26px); }
h4 { font-size: clamp(17px, 1.8vw, 20px); letter-spacing: 0.06em; }

strong { font-weight: 700; }

a {
  color: var(--ice);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: rgba(11, 110, 153, 0.35);
}

a:hover { text-decoration-color: currentColor; }

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

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

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

.section {
  padding-block: var(--beat);
}

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

.section__title { margin: 0; }

.grid {
  display: grid;
  gap: clamp(22px, 3vw, 44px);
}

.grid--8-4 { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.grid--7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }

.band--deep {
  background: var(--deep);
  color: var(--frost);
}

.band--deep a { color: var(--cyan); }

.band--frost { background: var(--mist); }

.clip-slant {
  clip-path: polygon(0 0, 100% 0, 100% 92%, 0 100%);
}

/* ---------- 5. Text utilities ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ice);
}

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

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.7;
  max-width: 36em;
  color: var(--ink);
}

.muted { color: var(--mute); }

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

.prose {
  max-width: 38em;
  font-size: 17px;
  line-height: 1.75;
}

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

.prose h2,
.prose h3 { margin-top: 1.6em; }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 14px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease,
    border-color 0.18s ease;
}

.btn--ember {
  background: var(--ember);
  color: #ffffff;
}

.btn--ember:hover {
  background: var(--ember-soft);
  color: var(--ink);
}

.btn--ice {
  background: var(--ice);
  color: #ffffff;
}

.btn--ice:hover { background: var(--ice-mid); }

.btn--line {
  background: transparent;
  border-color: var(--line);
  color: var(--ice);
}

.btn--line:hover {
  border-color: var(--cyan);
  background: var(--mist);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(244, 251, 252, 0.4);
  color: var(--frost);
}

.btn--ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

/* ---------- 7. Status ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(221, 244, 251, 0.65);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ice);
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  flex: 0 0 auto;
}

/* ---------- 8. Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--mute);
}

.breadcrumb a {
  color: var(--ice);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb span[aria-hidden] { opacity: 0.55; }

/* ---------- 9. Panels ---------- */
.panel {
  border-radius: var(--radius-l);
  padding: clamp(22px, 3.2vw, 46px);
}

.panel--frost { background: var(--mist); }

.panel--outline {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.panel--deep {
  background: var(--deep);
  color: var(--frost);
}

.panel--deep a { color: var(--cyan); }

/* ---------- 10. Chapter number ---------- */
.chapter-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 54px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--line);
}

.panel--deep .chapter-num,
.band--deep .chapter-num { color: rgba(0, 229, 195, 0.5); }

/* ---------- 11. Rails ---------- */
.rail {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  padding-bottom: 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.rail > * {
  flex: 0 0 clamp(240px, 28vw, 340px);
  scroll-snap-align: start;
}

.rail--free > * {
  flex: 0 0 auto;
  width: auto;
  max-width: min(86vw, 420px);
}

.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-track { background: transparent; }
.rail::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}

/* ---------- 12. Media frames ---------- */
.media-frame {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-m);
  background:
    linear-gradient(155deg, var(--deep) 0%, var(--ice) 62%, var(--ice-mid) 100%);
  isolation: isolate;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      115deg,
      rgba(244, 251, 252, 0.06) 0 1px,
      transparent 1px 14px
    );
  pointer-events: none;
  z-index: 1;
}

.media-frame img,
.media-frame video {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.media-frame--wide { aspect-ratio: 16 / 9; }
.media-frame--portrait { aspect-ratio: 9 / 16; }
.media-frame--tall { aspect-ratio: 4 / 5; }
.media-frame--square { aspect-ratio: 1 / 1; }

/* ---------- 13. Header ---------- */
.site-header {
  position: relative;
  z-index: 60;
  background: var(--frost);
}

.site-header::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--cyan) 0%,
    var(--ice-mid) 45%,
    var(--deep) 100%
  );
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -120px;
  z-index: 200;
  padding: 10px 20px;
  border-radius: 0 0 12px 12px;
  background: var(--deep);
  color: var(--frost);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: top 0.18s ease;
}

.skip-link:focus {
  top: 0;
  color: var(--cyan);
}

/* --- 13a. Masthead（上层品牌说明） --- */
.masthead {
  background: var(--deep);
  color: var(--frost);
}

.masthead__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  min-height: 44px;
  padding-block: 9px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.09em;
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: rgba(244, 251, 252, 0.86);
}

.masthead__mark {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  background: var(--cyan);
  transform: rotate(45deg);
}

.masthead__status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: rgba(244, 251, 252, 0.6);
  white-space: nowrap;
}

.masthead__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  flex: 0 0 auto;
  animation: lk-pulse 2.6s ease-out infinite;
}

.masthead__aside {
  padding-left: 8px;
  border-left: 1px solid rgba(169, 216, 232, 0.28);
}

@keyframes lk-pulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 229, 195, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(0, 229, 195, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 195, 0); }
}

/* --- 13b. Scene nav（下层栏目） --- */
.scene-nav {
  position: relative;
  background: var(--frost);
  border-bottom: 1px solid var(--line);
}

.scene-nav__in {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 34px);
  min-height: 78px;
}

.scene-nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  text-decoration: none;
  color: var(--ink);
}

.scene-nav__logo-num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: var(--deep);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  clip-path: polygon(0 0, 100% 0, 100% 72%, 72% 100%, 0 100%);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.scene-nav__logo:hover .scene-nav__logo-num {
  background: var(--ice);
  color: var(--frost);
}

.scene-nav__logo-text {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ice);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

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

.nav-toggle__bars {
  position: relative;
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: background-color 0.18s ease;
}

.nav-toggle__bars::before,
.nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  background: currentColor;
  transition: transform 0.18s ease;
}

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

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before {
  transform: translateY(5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after {
  transform: translateY(-5px) rotate(-45deg);
}

.scene-nav__nav { margin-left: auto; }

.scene-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.8vw, 28px);
}

.scene-nav__link {
  position: relative;
  display: inline-block;
  padding: 8px 1px 11px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.16s ease;
}

.scene-nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 2px;
  background: var(--cyan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.18s ease;
}

.scene-nav__link:hover { color: var(--ice); }
.scene-nav__link:hover::after { transform: scaleX(1); }

.scene-nav__link[aria-current="page"] {
  color: var(--ice);
  font-weight: 700;
}

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

.scene-nav__cta {
  flex: 0 0 auto;
  padding: 12px 22px;
  font-size: 14px;
  letter-spacing: 0.06em;
}

/* ---------- 14. Footer ---------- */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--deep);
  color: var(--frost);
  margin-top: var(--beat);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--cyan) 0%,
    var(--ice-mid) 42%,
    rgba(11, 110, 153, 0) 100%
  );
}

.site-footer__glow {
  position: absolute;
  top: -34%;
  right: -12%;
  width: 62vw;
  height: 62vw;
  max-width: 760px;
  max-height: 760px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 229, 195, 0.16) 0%,
    rgba(0, 229, 195, 0) 62%
  );
  pointer-events: none;
}

.site-footer .wrap { position: relative; z-index: 1; }

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  align-items: end;
  gap: clamp(16px, 3vw, 40px);
  padding-block: clamp(48px, 6.5vw, 88px) clamp(26px, 4vw, 46px);
}

.footer-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 7.2vw, 88px);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: 0.04em;
}

.footer-brand__word { color: var(--frost); }

.footer-brand__cn {
  margin-left: 0.16em;
  font-size: 0.7em;
  letter-spacing: 0.18em;
  color: var(--cyan);
}

.footer-service {
  margin: 0;
  max-width: 34em;
  font-size: 15.5px;
  line-height: 1.7;
  color: rgba(244, 251, 252, 0.72);
}

.footer-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(28px, 4vw, 48px);
  border-top: 1px solid rgba(169, 216, 232, 0.2);
}

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

.footer-heading {
  margin: 0 0 16px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
}

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

.footer-link {
  display: inline-block;
  font-size: 15px;
  color: rgba(244, 251, 252, 0.82);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.footer-link:hover {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

.footer-meta__row {
  display: grid;
  gap: 2px;
  margin: 0 0 14px;
}

.footer-meta__k {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(0, 229, 195, 0.85);
}

.footer-value {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(244, 251, 252, 0.86);
  overflow-wrap: anywhere;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 28px;
  padding-block: 22px;
  border-top: 1px solid rgba(169, 216, 232, 0.2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(244, 251, 252, 0.5);
}

.footer-legal__item { margin: 0; }

/* ---------- 15. Scroll progress（由 JS 注入） ---------- */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 90;
  background: linear-gradient(90deg, var(--cyan) 0%, var(--ice-mid) 100%);
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
  will-change: transform;
}

/* ---------- 16. Reveal ---------- */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.18s ease-out, transform 0.18s ease-out;
}

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

/* ---------- 17. Responsive ---------- */
@media (max-width: 1080px) {
  .scene-nav__link { font-size: 14px; }
  .scene-nav__cta { padding: 11px 18px; font-size: 13px; }
}

@media (max-width: 940px) {
  .grid--8-4,
  .grid--7-5 { grid-template-columns: minmax(0, 1fr); }

  .footer-top { grid-template-columns: minmax(0, 1fr); align-items: start; }
}

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

  .scene-nav__nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 70;
    display: none;
    margin-left: 0;
    padding: 8px var(--gutter) 26px;
    background: var(--frost);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 28px 44px -30px rgba(6, 42, 58, 0.6);
  }

  .scene-nav__nav[data-open] { display: block; }

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

  .scene-nav__list > li + li { border-top: 1px solid rgba(169, 216, 232, 0.5); }

  .scene-nav__link {
    display: block;
    padding: 15px 2px;
    font-size: 17px;
  }

  .scene-nav__link::after { display: none; }

  .scene-nav__link[aria-current="page"] {
    padding-left: 14px;
    border-left: 3px solid var(--cyan);
  }

  .scene-nav__cta { margin-left: auto; }

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

  .footer-meta { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .masthead__aside { display: none; }

  .masthead__in { font-size: 11px; letter-spacing: 0.06em; }

  .scene-nav__logo-text { display: none; }

  .scene-nav__in { min-height: 66px; gap: 10px; }

  .scene-nav__logo-num { width: 38px; height: 38px; font-size: 13px; }

  .nav-toggle { padding: 8px 12px; }

  .scene-nav__cta { padding: 10px 15px; font-size: 12.5px; letter-spacing: 0.04em; }

  .footer-legal { justify-content: flex-start; font-size: 11.5px; }
}

@media (max-width: 520px) {
  .footer-cols { grid-template-columns: minmax(0, 1fr); }
  .footer-meta { grid-column: auto; }
}

@media (max-width: 380px) {
  .nav-toggle__label { display: none; }
  .nav-toggle { padding: 9px 11px; }
}

/* ---------- 18. 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.js [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .masthead__dot { animation: none; }
}
