/* ==========================================================================
   幸运28品牌站 · /assets/site.css
   共享外壳：设计变量、中文排版、页头、页脚、按钮、面包屑、基础组件
   ========================================================================== */

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

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

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

ul, ol { padding: 0; }
ul[class], ol[class] { 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%; }

/* 2. 设计变量 -------------------------------------------------------------- */
:root {
  --navy-900: #0A1B33;
  --navy-800: #0E2445;
  --navy-700: #12305A;
  --blue-600: #1E4E8C;
  --slate: #5B6B82;
  --mist: #E9EDF3;
  --paper: #F7F5EF;
  --orange: #FF7A1A;
  --orange-soft: #FF9247;
  --orange-deep: #B34700;
  --ink: #0A0E14;
  --line: #C9D2DF;

  --font-sans: "Noto Sans SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;

  --header-h: 64px;
  --wrap: 1200px;
  --radius: 2px;

  --ease: 180ms ease;
  --focus-ring: 0 0 0 2px var(--paper), 0 0 0 4px var(--orange);
}

/* 3. 基础排版 -------------------------------------------------------------- */
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--navy-900);
}

h1 { font-size: clamp(32px, 4.4vw, 52px); }
h2 { font-size: clamp(26px, 3.2vw, 40px); }
h3 { font-size: clamp(19px, 2.1vw, 24px); }

p { max-width: 68ch; }

strong { font-weight: 700; }

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

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

#main-content {
  scroll-margin-top: calc(var(--header-h) + 12px);
}

#main-content:focus { outline: none; }

/* 4. 跳转链接 -------------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 120;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
  background: var(--orange);
  border-radius: var(--radius);
  transition: top var(--ease);
}

.skip-link:focus { top: 12px; }

/* 5. 页头 ------------------------------------------------------------------ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  color: #fff;
  background: linear-gradient(180deg, rgba(10, 27, 51, 0.88) 0%, rgba(10, 27, 51, 0.44) 62%, rgba(10, 27, 51, 0) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transition: background-color var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.site-header[data-scrolled="true"] {
  background: var(--navy-900);
  border-bottom-color: rgba(201, 210, 223, 0.24);
  box-shadow: 0 12px 30px rgba(4, 12, 24, 0.28);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 28px);
  width: 100%;
  max-width: var(--wrap);
  min-height: var(--header-h);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  padding: 6px 4px;
  border-radius: var(--radius);
}

.brand__mark {
  position: relative;
  display: block;
  width: 26px;
  height: 26px;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  border-radius: var(--radius);
  flex: none;
}

.brand__mark::before {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  background: var(--orange);
}

.brand__dot {
  position: absolute;
  left: -4px;
  bottom: -4px;
  width: 9px;
  height: 9px;
  border: 1.5px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: var(--navy-900);
}

.brand__text {
  display: grid;
  gap: 2px;
}

.brand__name {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #fff;
}

.brand__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.6);
}

/* 移动菜单按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: var(--radius);
  transition: border-color var(--ease), background-color var(--ease);
}

.nav-toggle:hover {
  border-color: var(--orange);
  background: rgba(255, 255, 255, 0.08);
}

.nav-toggle__bars {
  display: grid;
  gap: 3px;
  width: 16px;
}

.nav-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
  transition: transform var(--ease), opacity var(--ease);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

.nav-toggle__label { white-space: nowrap; }

/* 主导航 */
.site-nav { margin-left: auto; }

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

.site-nav__item { position: relative; }

.site-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.84);
  border-bottom: 2px solid transparent;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: color var(--ease), background-color var(--ease), border-color var(--ease);
}

.site-nav__link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-bottom-color: var(--orange);
}

.site-nav__link[aria-current="page"] {
  color: #fff;
  border-bottom-color: var(--orange);
}

.site-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  transform: translateX(-50%);
}

.site-nav__item--pinned {
  margin-left: 6px;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.site-nav__link--pin {
  background: rgba(255, 255, 255, 0.07);
}

.site-nav__pin {
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--orange);
  border-radius: 1px;
}

/* 阅读进度 */
.scroll-meter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.scroll-meter__bar {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left center;
}

/* 固定订阅按钮 */
.subscribe-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.02em;
  color: var(--navy-900);
  background: var(--orange);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(10, 27, 51, 0.28);
  transition: background-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.subscribe-fab::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--navy-900);
}

.subscribe-fab:hover {
  background: var(--orange-soft);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(10, 27, 51, 0.32);
}

/* 6. 布局与通用容器 -------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(18px, 4vw, 40px);
}

.prose { max-width: 680px; }

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

.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  padding-bottom: 14px;
  margin-bottom: clamp(22px, 3vw, 36px);
  border-bottom: 1px dashed var(--line);
}

.surface--mist { background: var(--mist); }
.surface--navy { background: var(--navy-900); color: rgba(255, 255, 255, 0.82); }
.surface--navy h1,
.surface--navy h2,
.surface--navy h3 { color: #fff; }

.kicker {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.surface--navy .kicker { color: var(--orange); }

.chapter-no {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(56px, 8vw, 104px);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  color: var(--orange);
}

.lede {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.7;
  color: var(--slate);
}

.surface--navy .lede { color: rgba(255, 255, 255, 0.74); }

/* 首屏底座，保证透明页头可读 */
.page-hero {
  padding-top: calc(var(--header-h) + clamp(44px, 7vw, 88px));
  padding-bottom: clamp(36px, 6vw, 76px);
  background: var(--navy-900);
  color: #fff;
}

.page-hero__title {
  margin-top: 14px;
  font-size: clamp(34px, 4.6vw, 56px);
  line-height: 1.08;
  color: #fff;
}

.page-hero__lead {
  margin-top: 18px;
  max-width: 620px;
  font-size: clamp(16px, 1.7vw, 18px);
  color: rgba(255, 255, 255, 0.76);
}

/* 7. 按钮与标签 ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition: background-color var(--ease), color var(--ease), border-color var(--ease), transform var(--ease);
}

.btn--solid {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--navy-900);
}

.btn--solid:hover {
  background: var(--orange-soft);
  border-color: var(--orange-soft);
  transform: translateY(-2px);
}

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

.btn--line:hover {
  border-color: var(--orange-deep);
  color: var(--orange-deep);
}

.btn--onDark {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

.btn--onDark:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  color: var(--slate);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tag--orange {
  color: var(--orange-deep);
  background: rgba(255, 122, 26, 0.09);
  border-color: rgba(255, 122, 26, 0.45);
}

/* 8. 面包屑 ---------------------------------------------------------------- */
.breadcrumb {
  font-size: 13px;
  color: var(--slate);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.breadcrumb__link {
  color: var(--blue-600);
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}

.breadcrumb__link:hover {
  color: var(--orange-deep);
  border-bottom-color: var(--orange-deep);
}

.breadcrumb__sep { color: var(--line); }

.breadcrumb__current {
  font-weight: 600;
  color: var(--ink);
}

/* 9. 面板 / 读数 / 路径 / 纸张 / 图片容器 --------------------------------- */
.panel {
  padding: clamp(18px, 3vw, 28px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px dashed var(--line);
}

.panel__title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--navy-900);
}

.stat { display: grid; gap: 6px; }

.stat__value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 500;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--navy-900);
}

.stat__label {
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--slate);
}

.path {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 14px;
}

.path__step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 200px;
  padding-top: 14px;
  border-top: 2px solid var(--line);
}

.path__node {
  width: 12px;
  height: 12px;
  flex: none;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 122, 26, 0.16);
}

.path__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink);
}

.paper-card {
  position: relative;
  padding: clamp(20px, 3vw, 32px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 8px 8px 0 -1px var(--mist), 8px 8px 0 0 var(--line);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.paper-card:hover {
  transform: translateY(-3px);
  border-color: var(--orange-deep);
  box-shadow: 8px 12px 0 -1px var(--mist), 8px 12px 0 0 var(--line);
}

.media-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 58%, var(--blue-600) 100%);
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  pointer-events: none;
}

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

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

.media-frame__caption {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--slate);
}

/* 10. 页脚 ---------------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.78);
  border-top: 4px solid var(--orange);
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(40px, 6vw, 64px) clamp(24px, 3vw, 36px);
  border-bottom: 1px dashed rgba(201, 210, 223, 0.28);
}

.site-footer__brand { max-width: 430px; }

.site-footer__mark {
  position: relative;
  display: block;
  width: 34px;
  height: 34px;
  margin-bottom: 16px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
}

.site-footer__mark::before {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  background: var(--orange);
}

.site-footer__name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
}

.site-footer__tagline {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.66);
}

.site-footer__readout {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(16px, 3vw, 36px);
}

.readout { min-width: 96px; }

.readout__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.readout__value {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 32px);
  padding-block: clamp(28px, 4vw, 40px);
  border-bottom: 1px dashed rgba(201, 210, 223, 0.28);
}

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

.footer-col__title {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

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

.footer-col__link {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid transparent;
  transition: color var(--ease), border-color var(--ease);
}

.footer-col__link:hover {
  color: #fff;
  border-bottom-color: var(--orange);
}

.site-footer__contact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 32px;
  padding-block: clamp(24px, 3vw, 36px);
  border-bottom: 1px dashed rgba(201, 210, 223, 0.28);
}

.contact-line { display: grid; gap: 4px; }

.contact-line__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.5);
}

.contact-line__value {
  font-size: 14px;
  line-height: 1.6;
  color: #fff;
  overflow-wrap: anywhere;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-block: clamp(20px, 3vw, 28px) 0;
}

.legal-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.legal-link {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid rgba(255, 255, 255, 0.28);
  transition: color var(--ease), border-color var(--ease);
}

.legal-link:hover {
  color: #fff;
  border-bottom-color: var(--orange);
}

.site-footer__base {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.5);
}

.site-footer__note {
  padding-block: 14px clamp(22px, 3vw, 32px);
  font-size: 12px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.5);
}

/* 11. 响应式 -------------------------------------------------------------- */
@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    z-index: 55;
    margin: 0;
    padding: 10px clamp(16px, 4vw, 32px) 24px;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--navy-900);
    border-bottom: 1px solid rgba(201, 210, 223, 0.22);
    box-shadow: 0 24px 40px rgba(4, 12, 24, 0.35);
    display: none;
  }

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

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

  .site-nav__link {
    width: 100%;
    padding: 14px 8px;
    font-size: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
  }

  .site-nav__link:hover,
  .site-nav__link[aria-current="page"] { border-bottom-color: var(--orange); }

  .site-nav__link[aria-current="page"]::after {
    left: auto;
    right: 8px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .site-nav__item--pinned {
    margin: 0;
    padding: 0;
    border-left: 0;
  }

  .site-nav__link--pin { background: rgba(255, 255, 255, 0.06); }

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

@media (max-width: 820px) {
  .site-footer__top { align-items: flex-start; }
  .site-footer__base { margin-left: 0; width: 100%; }
  .path { flex-direction: column; }
  .path__step { border-top-width: 1px; }
}

@media (max-width: 640px) {
  .site-header__inner { padding-inline: 16px; }
  .brand__meta { display: none; }
  .subscribe-fab {
    right: 16px;
    bottom: 16px;
    padding: 11px 16px;
    font-size: 13px;
  }
  .site-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .paper-card { box-shadow: 5px 5px 0 -1px var(--mist), 5px 5px 0 0 var(--line); }
}

@media (max-width: 420px) {
  .site-footer__grid { grid-template-columns: 1fr; }
  .readout { min-width: 72px; }
}

/* 12. 减少动效 ------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .paper-card:hover,
  .btn--solid:hover,
  .subscribe-fab:hover { transform: none; }
}
