/* ==========================================================================
   水果游戏机 · 全站共享样式 /assets/site.css
   骨架：重置 → 变量 → 基础排版 → 头部 → 页脚 → 通用组件 → 响应式
   ========================================================================== */

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

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

body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding-left: 0; list-style: none; }
img, svg, video { 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%; }

/* --------------------------------------------------------------------------
   设计变量
   -------------------------------------------------------------------------- */
:root {
  --watermelon: #F4364C;
  --lemon: #FFD23F;
  --lime: #A8E05F;
  --peach: #FF9B57;
  --ice: #7FD1E8;
  --rind: #10251C;
  --rind-2: #1B3A2C;
  --cream: #FFF8EC;
  --paper: #F2E7D5;
  --muted: #6B7A72;
  --wrap: 1180px;
  --wrap-narrow: 820px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-hard: 7px 7px 0 var(--rind);
  --shadow-soft: 4px 4px 0 var(--rind);
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --ease-out: cubic-bezier(.2, .7, .3, 1);
}

/* --------------------------------------------------------------------------
   基础排版
   -------------------------------------------------------------------------- */
body {
  min-height: 100vh;
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 10% -4%, rgba(255, 210, 63, .24), transparent 44%),
    radial-gradient(circle at 94% 2%, rgba(127, 209, 232, .22), transparent 40%);
  background-repeat: no-repeat;
  color: var(--rind);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-body);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.55rem); }
h4 { font-size: 1.125rem; }

p { line-height: 1.75; }

.mono { font-family: var(--font-mono); letter-spacing: -0.01em; }

.data {
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 0 .14em;
  background-image: linear-gradient(transparent 62%, rgba(255, 210, 63, .9) 62%);
}

.text-sticker {
  --sticker-line: var(--rind);
  text-shadow:
    1.5px 1.5px 0 var(--sticker-line),
    -1.5px 1.5px 0 var(--sticker-line),
    1.5px -1.5px 0 var(--sticker-line),
    -1.5px -1.5px 0 var(--sticker-line);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

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

/* --------------------------------------------------------------------------
   跳转链接
   -------------------------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: -140px;
  left: 1rem;
  z-index: 300;
  display: inline-block;
  padding: .7rem 1.15rem;
  background: var(--lemon);
  color: var(--rind);
  font-weight: 800;
  border: 3px solid var(--rind);
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0 var(--watermelon);
  transition: top .2s var(--ease-out);
}
.skip-link:focus { top: .85rem; }

/* --------------------------------------------------------------------------
   头部
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  color: var(--cream);
  background: transparent;
  transition: background-color .28s ease, box-shadow .28s ease;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg,
    rgba(16, 37, 28, .94) 0%,
    rgba(16, 37, 28, .72) 68%,
    rgba(16, 37, 28, 0) 100%);
  transition: opacity .28s ease;
  pointer-events: none;
}

.site-header[data-stuck="true"] {
  background-color: var(--rind);
  box-shadow: 0 5px 0 var(--watermelon);
}
.site-header[data-stuck="true"]::before { opacity: 0; }

.header-inner {
  width: min(calc(100% - 2 * var(--gutter)), var(--wrap));
  margin-inline: auto;
  min-height: 74px;
  padding-block: .7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(.6rem, 2vw, 1.75rem);
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex: 0 0 auto;
  min-width: 0;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 30%, #FF8FA0 0 16%, var(--watermelon) 17% 100%);
  border: 3px solid var(--rind);
  box-shadow: 3px 3px 0 var(--rind);
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 62%, var(--rind) 0 1.6px, transparent 2.2px),
    radial-gradient(circle at 60% 36%, var(--rind) 0 1.6px, transparent 2.2px),
    radial-gradient(circle at 68% 66%, var(--rind) 0 1.6px, transparent 2.2px);
}

.brand--onDark .brand-mark {
  border-color: var(--cream);
  box-shadow: 3px 3px 0 var(--watermelon);
}

.brand-text { display: flex; flex-direction: column; gap: .08rem; min-width: 0; }
.brand-name { font-size: 1.05rem; font-weight: 900; line-height: 1.1; letter-spacing: .02em; }
.brand-line {
  font-family: var(--font-mono);
  font-size: .68rem;
  line-height: 1.1;
  letter-spacing: .06em;
  opacity: .72;
  white-space: nowrap;
}

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

.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(.1rem, .8vw, .35rem);
  flex-wrap: nowrap;
}

.nav-item { display: block; }

.nav-link {
  position: relative;
  display: block;
  padding: .5rem .6rem;
  font-size: clamp(.8rem, .82vw, .92rem);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  border-radius: 8px;
  transition: color .16s ease, background-color .16s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: .6rem;
  right: .6rem;
  bottom: .26rem;
  height: 3px;
  border-radius: 2px;
  background: var(--watermelon);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .2s var(--ease-out);
}
.nav-link:hover::after,
.nav-link:focus-visible::after { transform: scaleX(1); }

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

/* 头部右侧 */
.header-actions {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex: 0 0 auto;
}

/* 汉堡键 */
.nav-toggle {
  position: relative;
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 2.5px solid var(--cream);
  border-radius: var(--radius-sm);
  background: rgba(255, 248, 236, .1);
  box-shadow: 3px 3px 0 var(--watermelon);
}

.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--cream);
  transform: translate(-50%, -50%);
  transition: transform .2s var(--ease-out), opacity .2s ease, background-color .2s ease;
}
.nav-toggle-bars::before { content: ""; transform: translate(-50%, -7px); }
.nav-toggle-bars::after { content: ""; transform: translate(-50%, 7px); }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translate(-50%, -50%) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translate(-50%, -50%) rotate(-45deg); }

/* 阅读进度 */
.read-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  z-index: 2;
  background: rgba(255, 248, 236, .16);
}

.read-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--lemon) 0%, var(--watermelon) 68%, var(--ice) 100%);
  transition: width .12s linear;
}

/* 返回顶部 */
.to-top {
  position: fixed;
  right: clamp(1rem, 4vw, 2rem);
  bottom: clamp(1rem, 4vw, 2rem);
  z-index: 80;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  font-size: .95rem;
  color: var(--cream);
  background: var(--watermelon);
  border: 3px solid var(--rind);
  border-radius: 12px;
  box-shadow: 4px 4px 0 var(--lemon);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .2s ease, transform .2s var(--ease-out), visibility .2s ease;
}
.to-top[data-visible] { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translate(-1px, -1px); }
.to-top:active { transform: translate(2px, 2px); }

/* --------------------------------------------------------------------------
   按钮
   -------------------------------------------------------------------------- */
.btn {
  --btn-shadow: var(--rind);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .62rem 1.05rem;
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  color: var(--rind);
  background: var(--paper);
  border: 2.5px solid var(--rind);
  border-radius: var(--radius-sm);
  box-shadow: 4px 4px 0 var(--btn-shadow);
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out), background-color .15s ease, color .15s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--btn-shadow); }
.btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--btn-shadow); }

.btn-primary {
  color: var(--cream);
  background: var(--watermelon);
  border-color: var(--rind);
  --btn-shadow: var(--lemon);
}

.btn-ghost {
  color: var(--rind);
  background: transparent;
  border-color: var(--rind);
  --btn-shadow: var(--rind);
}

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

.btn--onDark.btn-primary {
  color: var(--rind);
  background: var(--lemon);
  border-color: var(--cream);
  --btn-shadow: var(--watermelon);
}

.btn--onDark.btn-ghost {
  color: var(--cream);
  background: rgba(255, 248, 236, .1);
  --btn-shadow: var(--rind-2);
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 8vw, 6rem);
  color: var(--cream);
  background-color: var(--rind);
  background-image:
    radial-gradient(circle at 88% 0%, rgba(244, 54, 76, .24), transparent 46%),
    radial-gradient(circle at 4% 100%, rgba(127, 209, 232, .18), transparent 44%);
  background-repeat: no-repeat;
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 10px;
  background: repeating-linear-gradient(90deg,
    var(--watermelon) 0 36px,
    var(--lemon) 36px 72px,
    var(--lime) 72px 108px,
    var(--peach) 108px 144px);
}

.footer-inner {
  width: min(calc(100% - 2 * var(--gutter)), var(--wrap));
  margin-inline: auto;
  padding: clamp(3rem, 7vw, 4.5rem) 0 clamp(1.75rem, 4vw, 2.5rem);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.7fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.footer-brand { display: grid; gap: .85rem; justify-items: start; }

.footer-tagline {
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--lemon);
}

.footer-lede {
  max-width: 34ch;
  font-size: .95rem;
  line-height: 1.7;
  color: rgba(255, 248, 236, .76);
}

.footer-cta { margin-top: .3rem; }

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
}

.footer-col-title {
  margin-bottom: .85rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--lemon);
}

.footer-links { display: grid; gap: .5rem; }

.footer-link {
  display: inline-block;
  font-size: .92rem;
  color: rgba(255, 248, 236, .84);
  border-bottom: 2px solid transparent;
  transition: color .16s ease, border-color .16s ease, transform .16s var(--ease-out);
}
.footer-link:hover {
  color: var(--lemon);
  border-color: var(--watermelon);
  transform: translateX(3px);
}

.footer-contact {
  margin-top: clamp(2rem, 5vw, 3rem);
  padding-top: clamp(1.5rem, 4vw, 2rem);
  border-top: 2px dashed rgba(255, 248, 236, .26);
}

.contact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: .65rem;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .6rem;
  font-size: .92rem;
}

.contact-label {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: .76rem;
  letter-spacing: .1em;
  color: rgba(255, 248, 236, .55);
}

.contact-value { color: var(--cream); }

.footer-note {
  max-width: 74ch;
  margin-top: 1rem;
  font-size: .82rem;
  line-height: 1.7;
  color: rgba(255, 248, 236, .6);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 248, 236, .16);
  background: rgba(0, 0, 0, .22);
}

.footer-bottom-inner {
  width: min(calc(100% - 2 * var(--gutter)), var(--wrap));
  margin-inline: auto;
  padding: 1.1rem 0 1.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.25rem;
}

.footer-legal {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1.6;
  color: rgba(255, 248, 236, .68);
}

.footer-legal-link {
  border-bottom: 2px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.footer-legal-link:hover { color: var(--lemon); border-color: var(--watermelon); }

/* --------------------------------------------------------------------------
   容器与区块
   -------------------------------------------------------------------------- */
.container {
  width: min(calc(100% - 2 * var(--gutter)), var(--wrap));
  margin-inline: auto;
}

.container-narrow {
  width: min(calc(100% - 2 * var(--gutter)), var(--wrap-narrow));
  margin-inline: auto;
}

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

.section-head {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--watermelon);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--watermelon);
}

.section-lede {
  max-width: 62ch;
  font-size: 1.02rem;
  color: var(--muted);
}

.prose { max-width: 68ch; }
.prose p + p { margin-top: .9rem; }
.prose > * + h2,
.prose > * + h3 { margin-top: 1.8rem; }
.prose ul { display: grid; gap: .5rem; margin-top: .85rem; }
.prose li { position: relative; padding-left: 1.45rem; }
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .62em;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--lemon);
  border: 2px solid var(--rind);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

/* 斜切分区 */
.slant-band {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 6rem);
  background: var(--rind-2);
  color: var(--cream);
  clip-path: polygon(0 3.5%, 100% 0, 100% 96.5%, 0 100%);
}
.slant-band h2,
.slant-band h3 { color: var(--cream); }
.slant-band .section-lede { color: rgba(255, 248, 236, .72); }
.slant-band .eyebrow { color: var(--lemon); }
.slant-band .eyebrow::before { background: var(--lemon); }

/* --------------------------------------------------------------------------
   网格
   -------------------------------------------------------------------------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.75rem); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-aside { grid-template-columns: minmax(0, 1fr) minmax(200px, 290px); align-items: start; }

/* --------------------------------------------------------------------------
   卡带插槽卡片
   -------------------------------------------------------------------------- */
.cartridge {
  position: relative;
  padding: 1.9rem 1.3rem 1.35rem;
  background: var(--cream);
  border: 3px solid var(--rind);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out);
}
.cartridge::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background: var(--lemon);
  border-bottom: 3px solid var(--rind);
}
.cartridge:hover {
  transform: translate(-2px, -3px);
  box-shadow: 10px 10px 0 var(--rind);
}

.cartridge--watermelon::before { background: var(--watermelon); }
.cartridge--lime::before { background: var(--lime); }
.cartridge--peach::before { background: var(--peach); }
.cartridge--ice::before { background: var(--ice); }

.cartridge-body { margin-top: .55rem; display: grid; gap: .55rem; }

.cartridge-title {
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.3;
}

.cartridge-meta {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .02em;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   状态标签
   -------------------------------------------------------------------------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .6rem;
  font-family: var(--font-mono);
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  color: var(--rind);
  background: var(--paper);
  border: 2px solid var(--rind);
  border-radius: 999px;
}
.tag--lime { background: var(--lime); }
.tag--peach { background: var(--peach); }
.tag--lemon { background: var(--lemon); }
.tag--ice { background: var(--ice); }

/* --------------------------------------------------------------------------
   面包屑
   -------------------------------------------------------------------------- */
.breadcrumbs { padding-block: 1rem .25rem; }

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-mono);
  font-size: .79rem;
  color: var(--muted);
}

.breadcrumb-item { display: inline-flex; align-items: center; gap: .55rem; }
.breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  font-weight: 700;
  color: var(--watermelon);
}
.breadcrumb-item a:hover { color: var(--watermelon); }
.breadcrumb-current { font-weight: 700; color: var(--rind); }

/* --------------------------------------------------------------------------
   吸顶目录
   -------------------------------------------------------------------------- */
.rail {
  position: sticky;
  top: 108px;
  padding: 1rem .9rem 1.1rem;
  background: var(--paper);
  border: 3px solid var(--rind);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.rail-title {
  margin-bottom: .65rem;
  font-family: var(--font-mono);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.rail-list { display: grid; gap: .25rem; }

.rail-link {
  display: block;
  padding: .42rem .6rem;
  font-size: .88rem;
  font-weight: 700;
  line-height: 1.5;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}
.rail-link:hover { background: rgba(255, 210, 63, .4); }
.rail-link[aria-current="true"] {
  color: var(--rind);
  background: var(--lemon);
  border-color: var(--rind);
}

/* --------------------------------------------------------------------------
   图片容器
   -------------------------------------------------------------------------- */
.figure-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(45deg, rgba(16, 37, 28, .06) 0 10px, transparent 10px 20px);
  border: 3px solid var(--rind);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hard);
}
.figure-frame > img,
.figure-frame > picture > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.figure-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(45deg, rgba(16, 37, 28, .045) 0 10px, transparent 10px 20px);
}

.figure-frame--wide { aspect-ratio: 16 / 9; }
.figure-frame--square { aspect-ratio: 1 / 1; }
.figure-frame--tall { aspect-ratio: 3 / 4; }
.figure-frame--band { aspect-ratio: 21 / 9; }
.figure-frame--contain > img,
.figure-frame--contain > picture > img { object-fit: contain; padding: .75rem; }

.figure-caption {
  margin-top: .55rem;
  font-family: var(--font-mono);
  font-size: .76rem;
  line-height: 1.6;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   滚动显现
   -------------------------------------------------------------------------- */
[data-reveal] { opacity: 1; }

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
}
html.js [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
  transition: opacity .45s ease, transform .5s var(--ease-out);
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
  .nav-toggle { display: inline-flex; }
  .header-cta-secondary { display: none; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    display: none;
    padding: 1rem var(--gutter) 1.5rem;
    background: var(--rind-2);
    border-top: 3px solid var(--lemon);
    border-bottom: 4px solid var(--watermelon);
    box-shadow: 0 14px 0 rgba(16, 37, 28, .3);
    max-height: calc(100dvh - 90px);
    overflow-y: auto;
  }

  .site-nav[data-open] {
    display: block;
    animation: navDrop .2s var(--ease-out);
  }

  .nav-list { flex-direction: column; align-items: stretch; gap: .1rem; }

  .nav-link {
    padding: .85rem .9rem;
    font-size: 1.02rem;
    border-radius: 10px;
    border-bottom: 1px solid rgba(255, 248, 236, .12);
  }
  .nav-link::after { display: none; }
  .nav-link[aria-current="page"] {
    background: rgba(255, 210, 63, .16);
    color: var(--lemon);
  }
}

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

@media (max-width: 900px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .grid-2,
  .grid-3,
  .grid-aside { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; top: auto; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-line { display: none; }
  .figure-frame--tall { aspect-ratio: 4 / 5; }
  .figure-frame--band { aspect-ratio: 16 / 9; }
  .cartridge { box-shadow: 5px 5px 0 var(--rind); padding: 1.7rem 1.05rem 1.15rem; }
}

@media (max-width: 520px) {
  .footer-cols { grid-template-columns: minmax(0, 1fr); }
  .header-cta-primary { padding: .52rem .72rem; font-size: .82rem; }
  .contact-list { grid-template-columns: minmax(0, 1fr); }
}

/* --------------------------------------------------------------------------
   降低动效
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  html.js [data-reveal] { opacity: 1; transform: none; }
  .to-top { transform: none; }
}
