/* =========================================================
   奇异果体育赛事 — 全站共享样式 /assets/site.css
   设计关键词：堆叠面板、拼接首屏、深海蓝导航、果绿数据、炽橙 CTA、等宽比分
   ========================================================= */

/* ---------- 设计令牌 ---------- */
:root {
  --kiwi: #7AC74F;
  --kiwi-deep: #5E9E3A;
  --deep-blue: #1B2A4A;
  --mist-blue: #2B3D63;
  --orange: #FF8C42;
  --terracotta: #C97B63;
  --gray: #8A9BAB;
  --ink: #1F2430;
  --ink-soft: #414F66;
  --cream: #F5F0E8;
  --white: #FFFFFF;

  --font-display: "Montserrat Black", "Segoe UI", "SF Pro Display", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --header-h: 72px;
  --content-max: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-soft: 0 2px 10px rgba(31, 36, 48, 0.06);
  --shadow-float: 0 16px 40px rgba(31, 36, 48, 0.14);
  --border-soft: 1px solid rgba(138, 155, 171, 0.32);
}

/* ---------- Reset 与基础 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100dvh;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

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

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

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

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

#main-content {
  display: block;
  min-height: 70vh;
}

/* ---------- 标题与正文层级 ---------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(36px, 6vw, 64px);
}

h2 {
  font-size: clamp(26px, 4vw, 40px);
}

h3 {
  font-size: clamp(20px, 2.5vw, 28px);
}

h4 {
  font-size: 18px;
}

/* ---------- 布局工具 ---------- */
.container {
  width: min(var(--content-max), 100% - 48px);
  margin-inline: auto;
}

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

.section--tight {
  padding-block: clamp(32px, 5vw, 56px);
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--kiwi-deep);
}

.section-kicker::before {
  content: "";
  display: inline-block;
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: var(--orange);
}

.section-title {
  margin-bottom: 10px;
}

.section-lead {
  max-width: 640px;
  font-size: 17px;
  color: var(--ink-soft);
}

/* ---------- 面包屑 ---------- */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  padding-block: 16px;
  font-size: 14px;
  color: var(--gray);
}

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

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

.breadcrumbs a {
  color: var(--ink-soft);
  transition: color 0.18s ease;
}

.breadcrumbs a:hover {
  color: var(--kiwi-deep);
}

.breadcrumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- 网格 ---------- */
.grid {
  display: grid;
  gap: 24px;
}

.grid--gutter-lg {
  gap: clamp(24px, 4vw, 40px);
}

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

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

.grid--60-40 {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

.grid--40-60 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
}

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

[class^="col-"] {
  min-width: 0;
}

.col-4 {
  grid-column: span 4;
}

.col-6 {
  grid-column: span 6;
}

.col-8 {
  grid-column: span 8;
}

@media (max-width: 959px) {
  .grid--3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid--60-40,
  .grid--40-60 {
    grid-template-columns: minmax(0, 1fr);
  }

  .col-4,
  .col-6,
  .col-8 {
    grid-column: span 12;
  }
}

@media (max-width: 639px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.02em;
  transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease, transform 0.18s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background: var(--orange);
  color: var(--deep-blue);
  box-shadow: 0 8px 20px rgba(255, 140, 66, 0.28);
}

.btn--primary:hover {
  background: var(--kiwi);
  color: var(--deep-blue);
  box-shadow: 0 10px 24px rgba(122, 199, 79, 0.34);
}

.btn--ghost {
  border-color: rgba(245, 240, 232, 0.4);
  color: var(--cream);
}

.btn--ghost:hover {
  border-color: var(--kiwi);
  color: var(--kiwi);
  background: rgba(122, 199, 79, 0.1);
}

.btn--pc {
  padding: 10px 18px;
  font-size: 13px;
}

/* ---------- 跳过链接 ---------- */
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 3000;
  padding: 12px 18px;
  border-radius: 0 0 12px 12px;
  background: var(--kiwi);
  color: var(--deep-blue);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  transition: top 0.22s ease;
}

.skip-link:focus-visible {
  top: 0;
  outline: 3px solid var(--orange);
  outline-offset: 0;
}

/* ---------- 滚动进度条 ---------- */
.scroll-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 1300;
  background: linear-gradient(90deg, var(--kiwi), var(--orange));
  transform: scaleX(0);
  transform-origin: 0 50%;
  pointer-events: none;
}

/* ---------- 头部 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(27, 42, 74, 0.78), rgba(27, 42, 74, 0.28) 64%, rgba(27, 42, 74, 0));
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: var(--deep-blue);
  box-shadow: 0 4px 20px rgba(13, 20, 37, 0.28);
  transition: opacity 0.3s ease;
}

.site-header[data-scrolled]::before {
  opacity: 1;
}

.site-header__inner {
  position: relative;
  z-index: 1;
  max-width: var(--content-max);
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

/* 品牌 */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
  color: var(--white);
}

.brand__mark {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  background: var(--kiwi);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.brand__mark::after {
  content: "";
  position: absolute;
  top: 58%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--orange);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.brand__text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 19px;
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.brand:hover .brand__text {
  color: var(--kiwi);
}

.brand__text-accent {
  color: var(--kiwi);
}

/* 主导航 */
.header-nav {
  justify-self: center;
}

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

.header-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 9px 13px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  transition: color 0.18s ease, background 0.18s ease;
}

.header-nav__link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

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

.header-nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 3px;
  height: 3px;
  border-radius: 2px;
  background: var(--kiwi);
}

.header-actions {
  justify-self: end;
}

/* 移动导航按钮 */
.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 6px 8px 12px;
  border-radius: 999px;
  color: var(--white);
  transition: background 0.2s ease;
}

.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.nav-toggle__label {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.nav-toggle__icon {
  position: relative;
  width: 24px;
  height: 18px;
}

.nav-toggle__icon > span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2.5px;
  border-radius: 2px;
  background: var(--white);
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.nav-toggle__icon > span:nth-child(1) {
  top: 0;
}

.nav-toggle__icon > span:nth-child(2) {
  top: 7px;
}

.nav-toggle__icon > span:nth-child(3) {
  top: 14px;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon > span:nth-child(1) {
  top: 7px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon > span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon > span:nth-child(3) {
  top: 7px;
  transform: rotate(-45deg);
}

/* ---------- 头部移动端 ---------- */
@media (max-width: 959px) {
  .site-header__inner {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
  }

  .header-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 12px;
    right: 12px;
    z-index: 120;
    padding: 8px;
    max-height: calc(100dvh - 96px);
    overflow-y: auto;
    background: rgba(27, 42, 74, 0.97);
    border: 1px solid rgba(138, 155, 171, 0.24);
    border-radius: 16px;
    box-shadow: 0 20px 44px rgba(13, 20, 37, 0.42);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  }

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

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

  .header-nav__link {
    display: flex;
    padding: 12px 16px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.9);
  }

  .header-nav__link:hover {
    background: rgba(122, 199, 79, 0.14);
  }

  .header-nav__link[aria-current="page"] {
    background: rgba(122, 199, 79, 0.14);
    color: var(--kiwi);
  }

  .header-nav__link[aria-current="page"]::after {
    display: none;
  }

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

@media (max-width: 479px) {
  .brand__mark {
    width: 24px;
    height: 24px;
  }

  .brand__text {
    font-size: 17px;
  }

  .btn--pc {
    padding: 8px 10px;
    font-size: 12px;
  }
}

/* ---------- 页脚 ---------- */
.site-footer {
  background:
    linear-gradient(180deg, rgba(122, 199, 79, 0.05), transparent 220px),
    var(--deep-blue);
  color: rgba(245, 240, 232, 0.82);
}

.site-footer__cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  max-width: var(--content-max);
  margin-inline: auto;
  padding: 28px var(--gutter);
  border-bottom: 1px solid var(--mist-blue);
}

.site-footer__cta-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(16px, 2vw, 20px);
  color: var(--white);
  letter-spacing: 0.01em;
}

.site-footer__inner {
  max-width: var(--content-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.35fr 1fr 1.1fr;
  gap: clamp(32px, 5vw, 64px);
  padding: clamp(40px, 6vw, 64px) var(--gutter) 48px;
}

.site-footer__brand-name {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 22px;
  color: var(--white);
}

.site-footer__slogan {
  max-width: 380px;
  margin-bottom: 14px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(245, 240, 232, 0.68);
}

.site-footer__note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray);
}

.site-footer__note::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--kiwi);
  box-shadow: 0 0 0 4px rgba(122, 199, 79, 0.18);
}

.site-footer__heading {
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--kiwi);
}

.site-footer__links li + li {
  margin-top: 10px;
}

.site-footer__links a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: rgba(245, 240, 232, 0.76);
  transition: color 0.18s ease, transform 0.18s ease;
}

.site-footer__links a:hover {
  color: var(--kiwi);
  transform: translateX(3px);
}

.site-footer__links--meta li {
  font-size: 14px;
  line-height: 1.5;
  color: rgba(245, 240, 232, 0.58);
}

.site-footer__value {
  display: block;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

.site-footer__bottom {
  border-top: 1px solid var(--mist-blue);
  background: rgba(20, 32, 56, 0.5);
}

.site-footer__bottom-inner {
  max-width: var(--content-max);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 28px;
  padding: 18px var(--gutter);
  font-size: 13px;
  color: rgba(245, 240, 232, 0.55);
}

.site-footer__copy {
  color: rgba(245, 240, 232, 0.72);
}

.site-footer__icp {
  font-family: var(--font-mono);
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

.site-footer__legal a {
  color: rgba(245, 240, 232, 0.68);
  transition: color 0.18s ease;
}

.site-footer__legal a:hover {
  color: var(--kiwi);
}

/* 页脚响应式 */
@media (max-width: 959px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 639px) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .site-footer__cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-footer__bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 数据标签与数字 ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--mist-blue);
  color: var(--white);
}

.tag--kiwi {
  background: rgba(122, 199, 79, 0.14);
  border: 1px solid rgba(122, 199, 79, 0.36);
  color: var(--kiwi-deep);
}

.tag--orange {
  background: rgba(255, 140, 66, 0.14);
  border: 1px solid rgba(255, 140, 66, 0.4);
  color: #A65418;
}

.tag--solid {
  background: var(--kiwi);
  color: var(--deep-blue);
}

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

/* ---------- 卡片与面板 ---------- */
.card {
  position: relative;
  display: block;
  padding: clamp(20px, 3vw, 28px);
  background: var(--white);
  border: var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

a.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-float);
  border-color: rgba(122, 199, 79, 0.5);
}

.card__title {
  margin-bottom: 8px;
  font-size: 18px;
}

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

.card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--gray);
}

.panel {
  background: rgba(255, 255, 255, 0.78);
  border: var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.panel-stack {
  display: grid;
  gap: 12px;
}

.panel-stack > .panel {
  padding: clamp(24px, 4vw, 40px);
}

/* ---------- 时间轴 ---------- */
.timeline {
  position: relative;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--kiwi), var(--gray));
}

.timeline__item {
  position: relative;
  padding-bottom: 26px;
}

.timeline__item:last-child {
  padding-bottom: 0;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 5px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--cream);
  border: 3px solid var(--kiwi);
}

.timeline__time {
  display: inline-block;
  margin-bottom: 2px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  color: var(--terracotta);
}

.timeline__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
}

.timeline__desc {
  font-size: 14px;
  color: var(--ink-soft);
}

/* ---------- 手风琴 / 可展开内容组 ---------- */
.accordion {
  overflow: hidden;
  background: var(--white);
  border: var(--border-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

.accordion__item + .accordion__item {
  border-top: 1px solid rgba(138, 155, 171, 0.28);
}

.accordion__trigger {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.005em;
  color: var(--ink);
  transition: background 0.18s ease, color 0.18s ease;
}

.accordion__trigger:hover {
  background: rgba(122, 199, 79, 0.08);
  color: var(--kiwi-deep);
}

.accordion__icon {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
}

.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  border-radius: 2px;
  background: var(--kiwi-deep);
  transition: transform 0.25s ease;
}

.accordion__icon::before {
  left: 0;
  top: 8px;
  width: 18px;
  height: 2.5px;
}

.accordion__icon::after {
  left: 8px;
  top: 0;
  width: 2.5px;
  height: 18px;
}

.accordion__item[data-open] .accordion__icon::after {
  transform: scaleY(0);
}

.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.accordion__item[data-open] .accordion__panel {
  grid-template-rows: 1fr;
}

.accordion__content {
  min-height: 0;
  overflow: hidden;
  padding-inline: 20px;
}

.accordion__item[data-open] .accordion__content {
  padding-bottom: 20px;
}

/* ---------- 媒体容器 ---------- */
.media {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(120deg, var(--mist-blue), var(--deep-blue) 70%, #0E1729);
}

.media--portrait {
  aspect-ratio: 4 / 5;
}

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

.media--circle {
  aspect-ratio: 1;
  border-radius: 50%;
}

.media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(118deg, transparent 0 30px, rgba(255, 255, 255, 0.05) 30px 31px),
    radial-gradient(circle at 72% 28%, rgba(122, 199, 79, 0.22), transparent 46%);
}

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

.media__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
}

/* ---------- 返回顶部 ---------- */
.back-to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--orange);
  color: var(--deep-blue);
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 10px 26px rgba(31, 36, 48, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.18s ease;
}

.back-to-top:hover {
  background: var(--kiwi);
  color: var(--ink);
}

.back-to-top[data-visible] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- 滚动显现 ---------- */
html.js [data-reveal] {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

html.js [data-reveal]:not([data-revealed]) {
  opacity: 0;
  transform: translateY(20px);
}

html.js [data-revealed] {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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

  .card:hover {
    transform: none;
  }

  .back-to-top {
    transition: none;
  }
}
