@font-face {
  font-family: 'Instrument Sans';
  src: url('../_shared/fonts/InstrumentSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('../_shared/fonts/InstrumentSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Crimson Pro';
  src: url('../_shared/fonts/CrimsonPro-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

:root {
  --bg: #fff8ee;
  --bg2: #ffffff;
  --ink: #25312d;
  --muted: #6f7b73;
  --rule: #eadfce;
  --accent: #b35d2a;
  --accent2: #3d7466;
  --soft: #f4e7d4;
  --glow: #f7c978;
  --font: 'Instrument Sans', sans-serif;
  --serif: 'Crimson Pro', serif;
  --max: 1180px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.75;
  background:
    linear-gradient(90deg, rgba(179, 93, 42, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(61, 116, 102, 0.05) 1px, transparent 1px),
    radial-gradient(circle at 12% 8%, var(--glow), transparent 18rem),
    radial-gradient(circle at 88% 18%, var(--soft), transparent 22rem),
    var(--bg);
  background-size: 36px 36px, 36px 36px, auto, auto, auto;
}

a { color: inherit; }
.page {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px;
}

.site-nav {
  position: sticky;
  top: 14px;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  padding: 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: rgba(255, 248, 238, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 6px 6px 0 var(--ink);
}

.site-nav a,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--bg2);
  text-decoration: none;
  font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.site-nav a:hover,
.button-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
  background: var(--glow);
}

.site-nav a.active {
  background: var(--ink);
  color: var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: stretch;
}

.cover,
.module-card,
.paper,
.sticky,
.ending-card,
.profile-board {
  border: 2px solid var(--ink);
  border-radius: 30px;
  box-shadow: 9px 9px 0 var(--ink);
}

.cover {
  position: relative;
  padding: clamp(34px, 7vw, 78px);
  background:
    radial-gradient(circle at 90% 18%, rgba(247, 201, 120, 0.9), transparent 10rem),
    linear-gradient(135deg, var(--bg2), #fff2d7);
  overflow: hidden;
}

.cover::before {
  content: "点击模块跳转";
  position: absolute;
  right: 30px;
  top: 28px;
  transform: rotate(8deg);
  padding: 8px 16px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--glow);
  font-weight: 700;
}

.eyebrow {
  color: var(--accent2);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

h1 {
  max-width: 820px;
  font-size: clamp(3.1rem, 8vw, 7rem);
  line-height: 0.94;
  letter-spacing: -0.08em;
  margin-bottom: 24px;
}

h2 {
  font-size: clamp(2.1rem, 5vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.06em;
  margin-bottom: 18px;
}

h3 {
  font-size: 1.4rem;
  line-height: 1.15;
  margin-bottom: 10px;
}

.lead {
  max-width: 720px;
  color: var(--ink);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.profile-board {
  min-height: 430px;
  padding: 26px;
  background: var(--accent2);
  color: var(--bg);
  transform: rotate(1.5deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.profile-list {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}

.profile-list p {
  padding: 12px 14px;
  border: 2px solid rgba(255, 248, 238, 0.6);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.12);
}

.mini-avatar {
  display: grid;
  place-items: center;
  height: 140px;
  border: 2px solid var(--ink);
  border-radius: 24px;
  background: var(--bg);
  color: var(--accent2);
  font-size: 5rem;
  font-weight: 700;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.module-card {
  display: flex;
  min-height: 220px;
  padding: 22px;
  background: var(--bg2);
  text-decoration: none;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.module-card:nth-child(2) { background: #f7e2bd; transform: rotate(1deg); }
.module-card:nth-child(3) { background: #e8f0dc; transform: rotate(-1deg); }
.module-card:nth-child(4) { background: #ffe4d1; transform: rotate(0.8deg); }
.module-card:nth-child(5) { background: #e6edff; transform: rotate(-0.8deg); }

.module-card::after {
  content: "→";
  position: absolute;
  right: 18px;
  bottom: 14px;
  font-size: 2rem;
  font-weight: 700;
}

.module-card .tag,
.tag {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 20px;
  padding: 6px 10px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--bg);
  font-size: 0.85rem;
  font-weight: 700;
}

.module-card p,
.paper p,
.comic-card p,
.track span,
.ending-card p {
  color: var(--ink);
}

.main-stack {
  display: grid;
  gap: 26px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 26px;
}

.paper {
  padding: clamp(28px, 5vw, 54px);
  background: var(--bg2);
}

.paper p + p { margin-top: 14px; }

.sticky {
  padding: 28px;
  background: var(--glow);
  transform: rotate(-2deg);
}

.sticky ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

.sticky li {
  padding: 10px 0;
  border-bottom: 2px dashed rgba(37, 49, 45, 0.35);
}

.comic-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.comic-card {
  min-height: 250px;
  padding: 24px;
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: var(--bg2);
  box-shadow: 8px 8px 0 var(--ink);
  position: relative;
  overflow: hidden;
}

.comic-card:nth-child(2) { background: #f7e2bd; transform: rotate(1.2deg); }
.comic-card:nth-child(3) { background: #e8f0dc; transform: rotate(-1.2deg); }
.comic-card:nth-child(4) { background: #ffe4d1; transform: rotate(1deg); }

.comic-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -22px;
  width: 88px;
  height: 88px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.track-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.track {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 2px solid var(--ink);
  border-radius: 18px;
  background: var(--bg2);
  box-shadow: 5px 5px 0 var(--ink);
}

.track strong { color: var(--accent); font-size: 1.3rem; }
.track span { color: var(--muted); }

.ending-card {
  padding: clamp(34px, 6vw, 72px);
  background:
    radial-gradient(circle at 10% 20%, rgba(247, 201, 120, 0.8), transparent 12rem),
    var(--accent);
  color: var(--bg);
  text-align: center;
}

.ending-card p {
  max-width: 780px;
  margin: 0 auto;
  color: var(--bg);
  font-size: clamp(1.18rem, 2.8vw, 1.9rem);
  line-height: 1.45;
}

.ending-card .button-link {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--ink);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

footer {
  margin-top: 28px;
  color: var(--muted);
  text-align: center;
  font-size: 0.92rem;
}

@media (max-width: 1050px) {
  .hero-grid,
  .two-col,
  .module-grid,
  .comic-grid {
    grid-template-columns: 1fr;
  }
  .profile-board,
  .sticky,
  .module-card {
    transform: none !important;
  }
}

@media (max-width: 640px) {
  .page { padding: 18px; }
  .site-nav {
    position: static;
    border-radius: 26px;
  }
  .cover,
  .module-card,
  .paper,
  .sticky,
  .ending-card,
  .profile-board,
  .comic-card,
  .track {
    box-shadow: 5px 5px 0 var(--ink);
  }
  .track { grid-template-columns: 1fr; }
}
