:root {
  color-scheme: light;
  --ink: #161616;
  --muted: #5f656d;
  --paper: #f8f5ef;
  --surface: #ffffff;
  --line: #ded8cf;
  --red: #a93a32;
  --green: #2f7a5f;
  --blue: #2f6098;
  --yellow: #d7a62f;
  --shadow: 0 16px 40px rgba(30, 28, 24, 0.12);
  --radius: 8px;
  font-family: "Trebuchet MS", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(47, 96, 152, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(47, 96, 152, 0.06) 1px, transparent 1px),
    var(--paper);
  background-size: 36px 36px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 0 clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(22, 22, 22, 0.08);
  background: rgba(248, 245, 239, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 var(--ink);
  font-size: 14px;
}

.brand-text {
  font-size: 18px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-nav a {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 14px;
}

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

.hero {
  min-height: min(640px, calc(100vh - 72px));
  display: grid;
  align-content: center;
  gap: 28px;
  padding: clamp(56px, 10vw, 120px) clamp(18px, 5vw, 72px) 80px;
  background:
    linear-gradient(135deg, rgba(169, 58, 50, 0.92), rgba(47, 122, 95, 0.86)),
    url("../assets/images/pinyin-wizard-cover.webp") center 32% / cover;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, var(--paper));
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.kicker {
  margin: 0 0 12px;
  color: currentColor;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.98;
  text-wrap: balance;
}

.hero-intro {
  max-width: 620px;
  margin: 24px 0 0;
  font-size: 18px;
  line-height: 1.8;
}

.hero-action {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding: 14px 22px;
  border: 2px solid white;
  background: white;
  color: var(--ink);
  font-weight: 800;
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35);
}

.games-section,
.about-section {
  padding: 72px clamp(18px, 5vw, 72px);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
}

.section-heading .kicker {
  color: var(--red);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.game-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.game-cover-link {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #d7d0c5;
}

.game-cover {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 260ms ease;
}

.game-card:hover .game-cover {
  transform: scale(1.04);
}

.game-card-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.game-card-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.game-card h3 {
  margin: 0;
  font-size: 24px;
}

.game-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.play-link {
  width: fit-content;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  background: var(--green);
  color: white;
  font-weight: 800;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(280px, 1fr);
  gap: 32px;
  border-top: 1px solid var(--line);
}

.about-section p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.8;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 5vw, 72px);
  border-top: 2px solid var(--ink);
  background: var(--ink);
  color: white;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 720px) {
  .site-header {
    min-height: auto;
    padding-block: 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: 560px;
    padding-top: 64px;
  }

  .section-heading,
  .about-section,
  .site-footer {
    display: block;
  }

  .about-section p,
  .site-footer p + p {
    margin-top: 12px;
  }
}
