/* ==========================================================================
   BORDER TASK — 下载页
   奶油纸感 + 草地绿 + 陶土橙；主标题左上，下载按钮保持小尺寸。
   ========================================================================== */

:root {
  --paper: #f2ede3;
  --paper-deep: #e8e0d2;
  --cream: #fbf8f1;
  --ink: #1d2b23;
  --ink-soft: #435248;
  --muted: #6d786f;
  --line: rgba(29, 43, 35, 0.14);
  --line-strong: rgba(29, 43, 35, 0.24);
  --green: #3f664c;
  --green-deep: #284232;
  --orange: #d97757;
  --orange-deep: #bf5f41;
  --orange-soft: rgba(217, 119, 87, 0.12);
  --shadow: 0 28px 70px rgba(35, 45, 35, 0.16);
  --font-sans: "Microsoft YaHei UI", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "SimSun", Georgia, serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(217, 119, 87, 0.14), transparent 62%),
    radial-gradient(1000px 700px at 100% 8%, rgba(63, 102, 76, 0.13), transparent 58%),
    var(--paper);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  color: var(--cream);
  background: var(--green);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   顶部：游戏名在左上角
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 1.35rem clamp(1.2rem, 5vw, 5rem);
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  border-color: var(--line);
  background: rgba(242, 237, 227, 0.86);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.18rem;
  color: var(--ink);
  text-decoration: none;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  font-weight: 900;
  letter-spacing: 0.14em;
  white-space: nowrap;
}

.brand::before {
  content: "";
  width: 0.52rem;
  height: 0.52rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px var(--orange-soft);
}

.brand span {
  color: var(--orange);
  letter-spacing: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin-left: auto;
}

.header-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  transition: color 0.2s ease;
}

.header-nav a:hover {
  color: var(--ink);
}

.header-download {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.58rem 1rem;
  border: 1px solid var(--orange);
  border-radius: 999px;
  color: var(--orange-deep);
  background: transparent;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-download:hover {
  color: var(--cream);
  background: var(--orange);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   首屏
   -------------------------------------------------------------------------- */

main {
  position: relative;
  z-index: 1;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  min-height: 100svh;
  padding: 8.5rem clamp(1.2rem, 5vw, 5rem) 5.5rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 1.2rem;
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.eyebrow::before {
  content: "";
  width: 1.7rem;
  height: 1px;
  background: var(--green);
}

.hero h1 {
  max-width: 9.5em;
  font-size: clamp(3.1rem, 6.6vw, 6.6rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero h1 em {
  display: inline-block;
  color: var(--green);
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.075em;
}

.hero-lead {
  max-width: 30rem;
  margin-top: 1.7rem;
  color: var(--ink-soft);
  font-size: clamp(0.95rem, 1.2vw, 1.06rem);
  line-height: 1.9;
}

.hero-lead strong {
  color: var(--ink);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.2rem;
  margin-top: 2.2rem;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: auto;
  padding: 0.82rem 1.45rem;
  border: 0;
  border-radius: 999px;
  color: #fff8f1;
  background: var(--orange);
  box-shadow: 0 12px 24px rgba(191, 95, 65, 0.24);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-download span {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.btn-download:hover {
  background: var(--orange-deep);
  box-shadow: 0 16px 30px rgba(191, 95, 65, 0.3);
  transform: translateY(-2px);
}

.btn-download:hover span {
  transform: translateY(2px);
}

.download-meta {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

.download-meta b {
  color: var(--ink-soft);
  font-weight: 700;
}

/* 右侧画面 */
.hero-visual {
  position: relative;
  padding: 0.7rem 0 0.7rem 0.7rem;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 1.6rem 1.4rem 0 0;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: var(--green);
  opacity: 0.13;
  transform: rotate(2.5deg);
}

.shot-card {
  position: relative;
  z-index: 1;
  overflow: hidden;
  border: 1px solid rgba(29, 43, 35, 0.2);
  border-radius: 22px;
  background: var(--green-deep);
  box-shadow: var(--shadow);
  transform: rotate(-1.6deg);
  transition: transform 0.5s var(--ease);
}

.shot-card:hover {
  transform: rotate(-0.6deg) translateY(-4px);
}

.shot-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.shot-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.72rem;
  border: 1px solid rgba(255, 248, 241, 0.26);
  border-radius: 999px;
  color: #fff8f1;
  background: rgba(28, 40, 32, 0.55);
  backdrop-filter: blur(10px);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.shot-badge::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #b8d6a8;
}

.shot-caption {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.scroll-cue {
  position: absolute;
  left: clamp(1.2rem, 5vw, 5rem);
  bottom: 1.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.scroll-cue::before {
  content: "";
  width: 1px;
  height: 2.2rem;
  background: linear-gradient(var(--green), transparent);
}

/* --------------------------------------------------------------------------
   版本简介
   -------------------------------------------------------------------------- */

.versions {
  position: relative;
  padding: clamp(5rem, 9vw, 8rem) clamp(1.2rem, 5vw, 5rem);
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(232, 224, 210, 0.7), rgba(242, 237, 227, 0.3)),
    var(--paper);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto 2.8rem;
}

.kicker {
  margin-bottom: 0.8rem;
  color: var(--orange-deep);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.section-head h2 {
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.055em;
}

.section-head p {
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.8;
}

.version-list {
  display: grid;
  gap: 0.9rem;
  max-width: 1280px;
  margin: 0 auto;
}

.version-card {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) auto;
  align-items: start;
  gap: 1.5rem;
  padding: 1.55rem 1.7rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(251, 248, 241, 0.58);
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.version-card:hover {
  border-color: var(--line-strong);
  background: rgba(251, 248, 241, 0.86);
  transform: translateY(-2px);
}

.version-card.is-current {
  color: #f6f1e7;
  border-color: transparent;
  background: var(--green-deep);
  box-shadow: 0 18px 45px rgba(40, 66, 50, 0.18);
}

.version-card.is-current:hover {
  background: var(--green-deep);
}

.version-date {
  padding-top: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.is-current .version-date {
  color: rgba(246, 241, 231, 0.6);
}

.version-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.version-title-row h3 {
  font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.version-badge {
  padding: 0.22rem 0.55rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.is-current .version-badge {
  color: #f6d8c7;
  border-color: rgba(246, 216, 199, 0.28);
  background: rgba(217, 119, 87, 0.16);
}

.version-card h4 {
  margin-bottom: 0.5rem;
  color: var(--green);
  font-family: var(--font-serif);
  font-size: clamp(1rem, 1.15vw, 1.12rem);
  font-weight: 700;
}

.is-current h4 {
  color: #e8c7a8;
}

.version-card p {
  max-width: 46rem;
  color: var(--ink-soft);
  font-size: 0.86rem;
  line-height: 1.8;
}

.is-current p {
  color: rgba(246, 241, 231, 0.78);
}

.version-size {
  padding-top: 0.15rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.is-current .version-size {
  color: rgba(246, 241, 231, 0.65);
}

.versions-note {
  max-width: 1280px;
  margin: 1.2rem auto 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.8;
}

.versions-note a {
  color: var(--green);
  text-underline-offset: 0.18em;
}

/* --------------------------------------------------------------------------
   启动器小条
   -------------------------------------------------------------------------- */

.launcher-strip {
  padding: 0 clamp(1.2rem, 5vw, 5rem) clamp(5rem, 8vw, 7rem);
}

.launcher-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(1.6rem, 3vw, 2.6rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(217, 119, 87, 0.13), transparent 70%),
    rgba(251, 248, 241, 0.64);
}

.launcher-inner h2 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.5rem, 2.6vw, 2.2rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.launcher-inner p {
  max-width: 38rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.8;
}

.launcher-inner .btn-download {
  flex: none;
}

/* --------------------------------------------------------------------------
   页脚
   -------------------------------------------------------------------------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem clamp(1.2rem, 5vw, 5rem) 2.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}

.site-footer strong {
  color: var(--ink);
  letter-spacing: 0.12em;
}

.site-footer a {
  color: var(--muted);
  text-underline-offset: 0.2em;
}

/* --------------------------------------------------------------------------
   进入动画
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   响应式
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .header-nav {
    display: none;
  }

  .site-header {
    justify-content: space-between;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 2.6rem;
    min-height: auto;
    padding-top: 7.4rem;
  }

  .hero h1 {
    max-width: 11em;
  }

  .hero-visual {
    max-width: 680px;
    padding-left: 0.4rem;
  }

  .scroll-cue {
    display: none;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 1rem;
  }

  .version-card {
    grid-template-columns: 1fr auto;
    gap: 0.6rem 1rem;
  }

  .version-date {
    grid-column: 1 / -1;
    padding-top: 0;
  }

  .version-size {
    grid-column: 2;
    grid-row: 2;
  }

  .version-card > div:nth-child(2) {
    grid-column: 1;
  }

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

@media (max-width: 560px) {
  .site-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .header-download {
    padding: 0.52rem 0.78rem;
    font-size: 0.7rem;
  }

  .hero {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 3.5rem;
  }

  .hero h1 {
    font-size: clamp(2.9rem, 14vw, 4.3rem);
  }

  .hero-lead {
    margin-top: 1.2rem;
  }

  .versions,
  .launcher-strip {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .version-card {
    padding: 1.2rem;
  }

  .shot-caption {
    font-size: 0.64rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .shot-card,
  .version-card,
  .btn-download,
  .header-download {
    transition: none;
  }
}
