/* ============================================================
   新2投注指南 · 共享样式表  /assets/site.css
   深海蓝海面 + 珊瑚橙航标 + 青碧节点 + 暖沙金数字
   ============================================================ */

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

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

body, h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd, pre { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
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; text-decoration: none; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; }

/* ---------- 2. Tokens ---------- */
:root {
  --sea-950: #04121C;
  --sea-900: #071C2C;
  --sea-800: #0C2A40;
  --sea-700: #163E57;
  --coral: #FF6B4A;
  --coral-deep: #C94A31;
  --sand: #E6B566;
  --teal: #2ED3C6;
  --mist: #8FA99E;
  --fog: #EAF2F0;
  --ink: #08131F;

  --line: rgba(143, 169, 158, .26);
  --line-strong: rgba(143, 169, 158, .46);
  --line-soft: rgba(143, 169, 158, .12);

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

  --fs-12: 0.75rem;
  --fs-14: 0.875rem;
  --fs-16: 1rem;
  --fs-20: clamp(1.125rem, 1.5vw, 1.25rem);
  --fs-28: clamp(1.375rem, 2.3vw, 1.75rem);
  --fs-36: clamp(1.625rem, 3vw, 2.25rem);
  --fs-48: clamp(2rem, 4.4vw, 3rem);
  --fs-64: clamp(2.5rem, 6vw, 4rem);
  --fs-88: clamp(2.75rem, 8vw, 5.5rem);

  --shell-max: 1280px;
  --gutter: clamp(1rem, 4vw, 3rem);
  --cut: 22px;
  --pill: 999px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --scroll-progress: 0;
}

/* ---------- 3. Base typography ---------- */
body {
  font-family: var(--ff-body);
  font-size: var(--fs-16);
  line-height: 1.75;
  letter-spacing: .01em;
  color: var(--fog);
  background-color: var(--sea-900);
  background-image:
    radial-gradient(920px 460px at 8% -10%, rgba(46, 211, 198, .10), transparent 68%),
    radial-gradient(760px 420px at 96% 2%, rgba(255, 107, 74, .09), transparent 70%),
    radial-gradient(1100px 620px at 50% 118%, rgba(22, 62, 87, .50), transparent 76%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--ff-head);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.02em;
  color: var(--fog);
}
h1 { font-size: var(--fs-64); }
h2 { font-size: var(--fs-48); }
h3 { font-size: var(--fs-28); }
h4 { font-size: var(--fs-20); }

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

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

.mono {
  font-family: var(--ff-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: .03em;
}

.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 ---------- */
.shell {
  width: 100%;
  max-width: var(--shell-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.page-body {
  padding-block: clamp(2rem, 5vw, 4.5rem) clamp(3rem, 7vw, 6rem);
}

.section { padding-block: clamp(2.25rem, 5vw, 4rem); }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem 1.25rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.grid { display: grid; gap: clamp(1rem, 2.5vw, 2rem); }
.grid--7-5 { grid-template-columns: 7fr 5fr; }
.grid--4-8 { grid-template-columns: 4fr 8fr; }
.grid--3-9 { grid-template-columns: 3fr 9fr; }
.grid--3up { grid-template-columns: repeat(3, minmax(0, 1fr)); }

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

/* ---------- 5. Skip link ---------- */
.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 200;
  display: inline-block;
  padding: .7rem 1.15rem;
  border-radius: var(--pill);
  background: var(--sand);
  color: var(--ink);
  font-weight: 700;
  font-size: var(--fs-14);
  transform: translateY(-180%);
  transition: transform .22s var(--ease);
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--fog);
  outline-offset: 3px;
}

/* ---------- 6. Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  justify-content: center;
  padding: clamp(.6rem, 1.6vw, 1.25rem) var(--gutter) 0;
  pointer-events: none;
}

.header-shell {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(.5rem, 1.6vw, 1.5rem);
  width: 100%;
  max-width: var(--shell-max);
  padding: .55rem .6rem .55rem 1.05rem;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: rgba(7, 28, 44, .78);
  -webkit-backdrop-filter: blur(16px) saturate(1.25);
  backdrop-filter: blur(16px) saturate(1.25);
  box-shadow: 0 22px 46px -32px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(234, 242, 240, .06);
  transition: max-width .38s var(--ease), background-color .3s var(--ease),
              border-color .3s var(--ease), padding .3s var(--ease);
}

.site-header.is-tight .header-shell {
  max-width: 1120px;
  padding-block: .4rem;
  background: rgba(4, 18, 28, .93);
  border-color: var(--line-strong);
}

/* brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  flex: 0 0 auto;
  padding: .15rem .25rem .15rem 0;
}
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 1px solid rgba(46, 211, 198, .5);
}
.brand-mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  border: 1px solid rgba(230, 181, 102, .45);
}
.brand-pip {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(46, 211, 198, .16);
  animation: pip-pulse 3.6s var(--ease) infinite;
}
@keyframes pip-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(46, 211, 198, .16); }
  50%      { box-shadow: 0 0 0 8px rgba(46, 211, 198, .05); }
}
.brand-text { display: flex; flex-direction: column; gap: .05rem; min-width: 0; }
.brand-name {
  display: block;
  font-family: var(--ff-head);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.15;
  letter-spacing: -.01em;
  color: var(--fog);
}
.brand-sub {
  display: block;
  font-family: var(--ff-mono);
  font-size: .625rem;
  letter-spacing: .2em;
  line-height: 1.2;
  color: var(--mist);
  transition: opacity .26s var(--ease), transform .26s var(--ease);
}
.site-header.is-tight .brand-sub { opacity: 0; transform: translateY(-5px); }

/* nav toggle */
.nav-toggle {
  display: none;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
  padding: .5rem .8rem;
  border-radius: var(--pill);
  border: 1px solid var(--line-strong);
  color: var(--fog);
  font-size: var(--fs-12);
  letter-spacing: .1em;
}
.nav-toggle-bar {
  position: relative;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .22s var(--ease), opacity .22s var(--ease);
}
.nav-toggle-bar::before { top: -5px; }
.nav-toggle-bar::after  { top: 5px; }
.site-header[data-open] .nav-toggle-bar { background: transparent; }
.site-header[data-open] .nav-toggle-bar::before { transform: translateY(5px) rotate(45deg); }
.site-header[data-open] .nav-toggle-bar::after  { transform: translateY(-5px) rotate(-45deg); }

/* nav */
.primary-nav {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-left: auto;
  min-width: 0;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: .1rem;
  min-width: 0;
}
.nav-link {
  display: inline-block;
  padding: .48rem .68rem;
  border-radius: var(--pill);
  font-size: var(--fs-14);
  line-height: 1.35;
  color: var(--mist);
  white-space: nowrap;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav-link:hover { color: var(--fog); background: rgba(46, 211, 198, .10); }
.nav-link[aria-current="page"] {
  color: var(--ink);
  background: var(--sand);
  font-weight: 700;
}
.nav-link[aria-current="page"]:hover { background: var(--sand); color: var(--ink); }

.nav-cta { flex: 0 0 auto; font-size: var(--fs-14); padding: .62rem 1.05rem; }

/* scroll tide */
.header-progress {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: .26rem;
  height: 2px;
  border-radius: 2px;
  background: rgba(143, 169, 158, .16);
  overflow: hidden;
  pointer-events: none;
}
.header-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: left center;
  transform: scaleX(var(--scroll-progress));
  background: linear-gradient(90deg, var(--teal), var(--sand) 72%, var(--coral));
  will-change: transform;
}

/* ---------- 7. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .72rem 1.2rem;
  border-radius: var(--pill);
  border: 1px solid transparent;
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: var(--fs-14);
  line-height: 1;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--coral); color: var(--ink); }
.btn-primary:hover { background: var(--coral-deep); color: var(--fog); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--fog); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }
.btn-sand { background: var(--sand); color: var(--ink); }
.btn-sand:hover { background: #f0c987; }

/* ---------- 8. Chapter / numbering ---------- */
.chapter { display: flex; flex-direction: column; gap: .75rem; }
.chapter-index {
  font-family: var(--ff-mono);
  font-variant-numeric: tabular-nums;
  font-size: var(--fs-12);
  letter-spacing: .26em;
  color: var(--sand);
  text-transform: uppercase;
}
.chapter-title {
  font-size: var(--fs-36);
  max-width: 26ch;
}
.chapter-lede {
  max-width: 38ch;
  color: var(--mist);
  font-size: var(--fs-16);
}
.side-note {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--ff-mono);
  font-size: var(--fs-12);
  letter-spacing: .34em;
  color: var(--mist);
  align-self: start;
  justify-self: center;
}

/* ---------- 9. Panel / cards ---------- */
.panel {
  position: relative;
  padding: clamp(1.15rem, 2.6vw, 2rem);
  border: 1px solid var(--line);
  background: linear-gradient(158deg, rgba(12, 42, 64, .96), rgba(7, 28, 44, .96));
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  transition: border-color .24s var(--ease), background-color .24s var(--ease);
}
.panel:hover { border-color: var(--line-strong); }

/* ---------- 10. Image containers ---------- */
.media-frame {
  position: relative;
  overflow: hidden;
  background: var(--sea-800);
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.media-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.92);
}
.media-frame--wide   { aspect-ratio: 16 / 9; }
.media-frame--square { aspect-ratio: 1 / 1; }
.media-frame--tall   { aspect-ratio: 3 / 4; }
.media-caption {
  margin-top: .6rem;
  font-family: var(--ff-mono);
  font-size: var(--fs-12);
  letter-spacing: .06em;
  color: var(--mist);
}

/* ---------- 11. Tags & stats ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .22rem .6rem;
  border-radius: var(--pill);
  border: 1px solid currentColor;
  font-family: var(--ff-mono);
  font-size: var(--fs-12);
  line-height: 1.5;
  letter-spacing: .08em;
  color: var(--mist);
  white-space: nowrap;
}
.tag--teal  { color: var(--teal); background: rgba(46, 211, 198, .10); }
.tag--coral { color: var(--coral); background: rgba(255, 107, 74, .10); }
.tag--sand  { color: var(--sand); background: rgba(230, 181, 102, .10); }

.stat { display: flex; flex-direction: column; gap: .3rem; }
.stat-value {
  font-family: var(--ff-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--sand);
}
.stat-label {
  font-size: var(--fs-12);
  letter-spacing: .12em;
  color: var(--mist);
}

/* ---------- 12. Breadcrumbs ---------- */
.crumbs { padding-block: clamp(1rem, 2.5vw, 1.75rem) 0; }
.crumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  font-family: var(--ff-mono);
  font-size: var(--fs-12);
  letter-spacing: .06em;
  color: var(--mist);
}
.crumb-list > li + li::before {
  content: "›";
  margin-right: .45rem;
  color: var(--sea-700);
}
.crumb-link { color: var(--mist); transition: color .18s var(--ease); }
.crumb-link:hover { color: var(--teal); }
.crumb-current { color: var(--fog); }

/* ---------- 13. Reveal ---------- */
.reveal { opacity: 1; transform: none; }
.js-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .52s var(--ease), transform .52s var(--ease);
}
.js-ready .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- 14. Footer ---------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 8vw, 7rem);
  background: var(--sea-950);
  border-top: 1px solid var(--line);
  color: var(--mist);
  font-size: var(--fs-14);
}

.footer-tide {
  height: clamp(26px, 4.5vw, 54px);
  background-image:
    repeating-linear-gradient(115deg, rgba(46, 211, 198, .16) 0 2px, transparent 2px 22px),
    repeating-linear-gradient(115deg, rgba(255, 107, 74, .13) 0 1px, transparent 1px 68px);
  border-bottom: 1px solid var(--line-soft);
}

.footer-shell {
  max-width: var(--shell-max);
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 3.5rem) var(--gutter) 1.6rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.35fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}

.footer-brand { min-width: 0; }
.footer-brand-name {
  font-family: var(--ff-head);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -.01em;
  color: var(--fog);
}
.footer-version {
  margin-top: .4rem;
  font-size: var(--fs-14);
  color: var(--sand);
}
.footer-note {
  margin-top: .9rem;
  max-width: 34ch;
  line-height: 1.8;
  color: var(--mist);
}
.footer-hint {
  margin-top: .7rem;
  font-size: var(--fs-12);
  letter-spacing: .04em;
  color: var(--teal);
}

.footer-col { min-width: 0; }
.footer-heading {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .9rem;
  font-family: var(--ff-mono);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .26em;
  color: var(--mist);
}
.footer-heading::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--teal);
}
.footer-list { display: grid; gap: .55rem; }
.footer-list a {
  font-size: var(--fs-14);
  color: var(--fog);
  opacity: .84;
  transition: color .18s var(--ease), opacity .18s var(--ease);
}
.footer-list a:hover { color: var(--teal); opacity: 1; }

.footer-contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .35rem .6rem;
}
.footer-contact-label {
  flex: 0 0 auto;
  min-width: 2.6em;
  font-family: var(--ff-mono);
  font-size: .6875rem;
  letter-spacing: .18em;
  color: var(--mist);
}
.footer-contact-value {
  color: var(--fog);
  font-size: var(--fs-14);
  overflow-wrap: anywhere;
}
.footer-copy {
  flex: 0 0 auto;
  padding: .18rem .55rem;
  border-radius: var(--pill);
  border: 1px solid var(--line-strong);
  font-size: .6875rem;
  letter-spacing: .08em;
  color: var(--mist);
  transition: color .18s var(--ease), border-color .18s var(--ease),
              background-color .18s var(--ease);
}
.footer-copy:hover { color: var(--teal); border-color: var(--teal); }
.footer-copy.is-done {
  color: var(--sea-950);
  background: var(--teal);
  border-color: var(--teal);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  margin-top: clamp(1.75rem, 4vw, 2.75rem);
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
  font-size: var(--fs-12);
  color: var(--mist);
}
.footer-legal { letter-spacing: .02em; }
.footer-meta {
  font-family: var(--ff-mono);
  letter-spacing: .06em;
  color: rgba(143, 169, 158, .9);
}

/* ---------- 15. Responsive ---------- */
@media (max-width: 1080px) {
  .nav-link { padding: .46rem .55rem; }
  .brand-sub { letter-spacing: .14em; }
}

@media (max-width: 880px) {
  .site-header { padding-top: .5rem; }

  .header-shell {
    border-radius: 22px;
    padding: .5rem .55rem .5rem .85rem;
    gap: .4rem;
  }
  .site-header.is-tight .header-shell { max-width: var(--shell-max); padding-block: .45rem; }

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

  .primary-nav {
    position: absolute;
    top: calc(100% + .55rem);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    margin-left: 0;
    padding: .6rem;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(4, 18, 28, .97);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 26px 54px -30px rgba(0, 0, 0, .95);
  }
  .site-header[data-open] .primary-nav { display: flex; }

  .nav-list {
    flex-direction: row;
    gap: .4rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: .3rem;
    scrollbar-width: none;
  }
  .nav-list::-webkit-scrollbar { display: none; }

  .nav-link {
    border: 1px solid var(--line);
    background: rgba(22, 62, 87, .38);
    font-size: var(--fs-14);
    padding: .5rem .8rem;
  }
  .nav-link[aria-current="page"] { border-color: var(--sand); }

  .nav-cta { width: 100%; justify-content: center; padding-block: .75rem; }

  .header-progress { left: .95rem; right: .95rem; bottom: .2rem; }

  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .brand-name { font-size: .9375rem; }
  .brand-sub { font-size: .5625rem; }
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ---------- 16. 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;
    scroll-behavior: auto !important;
  }
  .brand-pip { animation: none; }
  .js-ready .reveal { opacity: 1; transform: none; }
  .btn:hover { transform: none; }
}
