:root {
  --bg: #efe6d8;
  --bg-deep: #d9c2a6;
  --surface: rgba(255, 251, 246, 0.8);
  --surface-strong: rgba(255, 248, 240, 0.94);
  --text: #1f1b16;
  --muted: #6a5d4d;
  --line: rgba(31, 27, 22, 0.12);
  --shadow: 0 28px 80px rgba(70, 44, 16, 0.16);
  --emerald: #185e4c;
  --emerald-soft: #d9ece4;
  --copper: #b45b32;
  --copper-soft: #f5e2d7;
  --navy: #23435c;
  --navy-soft: #dce8f3;
  --gold: #8d6a1e;
  --gold-soft: #f2ead4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.7), transparent 26%),
    radial-gradient(circle at right 10% top 15%, rgba(24, 94, 76, 0.12), transparent 22%),
    radial-gradient(circle at left 20% bottom 10%, rgba(180, 91, 50, 0.16), transparent 24%),
    linear-gradient(135deg, var(--bg), var(--bg-deep));
}

a {
  color: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 52px;
}

.hero,
.section {
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 32px;
  background: var(--surface);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.hero {
  padding: 28px;
  animation: rise 500ms ease both;
}

.eyebrow,
.section-kicker,
.panel-label,
.card-type {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  font-weight: 700;
}

.eyebrow,
.section-kicker {
  color: var(--emerald);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: stretch;
}

.hero-copy h1 {
  margin: 12px 0 0;
  font-size: clamp(40px, 7vw, 76px);
  line-height: 0.94;
  max-width: 10ch;
}

.hero-text {
  margin: 20px 0 0;
  max-width: 56ch;
  color: var(--muted);
  line-height: 1.7;
  font-size: 17px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.button:hover,
.card-link:hover,
.file-list a:hover {
  transform: translateY(-1px);
}

.primary {
  color: #fffaf5;
  background: linear-gradient(135deg, var(--emerald), #10372c);
}

.secondary {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.hero-panel {
  padding: 22px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.64), rgba(255, 248, 240, 0.88)),
    linear-gradient(135deg, var(--navy-soft), transparent);
  border: 1px solid rgba(255, 255, 255, 0.62);
}

.panel-label {
  color: var(--navy);
}

.route-list {
  margin: 14px 0 0;
  padding-left: 18px;
  line-height: 1.8;
  color: var(--muted);
}

.content {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}

.section {
  padding: 24px;
  animation: rise 620ms ease both;
}

.section-head h2 {
  margin: 10px 0 0;
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.04;
}

.card-grid,
.concept-grid,
.snippet-grid {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

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

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

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

.doc-card,
.concept-card,
.snippet-card {
  padding: 20px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.doc-card h3,
.concept-card h3,
.snippet-card h3 {
  margin: 10px 0 0;
  font-size: 24px;
}

.doc-card p,
.concept-card p,
.snippet-card p {
  color: var(--muted);
  line-height: 1.7;
}

.accent-a {
  background:
    linear-gradient(135deg, rgba(217, 236, 228, 0.88), rgba(255, 248, 240, 0.96));
}

.accent-a .card-type {
  color: var(--emerald);
}

.accent-b {
  background:
    linear-gradient(135deg, rgba(245, 226, 215, 0.88), rgba(255, 248, 240, 0.96));
}

.accent-b .card-type {
  color: var(--copper);
}

.accent-c {
  background:
    linear-gradient(135deg, rgba(220, 232, 243, 0.9), rgba(255, 248, 240, 0.96));
}

.accent-c .card-type {
  color: var(--navy);
}

.accent-d {
  background:
    linear-gradient(135deg, rgba(242, 234, 212, 0.92), rgba(255, 248, 240, 0.96));
}

.accent-d .card-type {
  color: var(--gold);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
}

.tag-list li {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 27, 22, 0.08);
  color: var(--muted);
  font-size: 14px;
}

.card-link {
  display: inline-flex;
  margin-top: 18px;
  font-weight: 700;
  text-decoration: none;
}

.concept-card {
  min-height: 150px;
}

.concept-card h3 {
  font-size: 22px;
}

pre {
  margin: 16px 0 0;
  padding: 16px;
  border-radius: 18px;
  background: #171410;
  color: #f8f3ea;
  overflow: auto;
}

code {
  font-family: "SFMono-Regular", "Menlo", "Monaco", monospace;
  font-size: 14px;
}

.file-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.file-list a {
  display: block;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.76);
  text-decoration: none;
  font-weight: 700;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .hero-grid,
  .card-grid,
  .concept-grid,
  .snippet-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 12ch;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 18px, 100%);
    padding: 16px 0 28px;
  }

  .hero,
  .section {
    padding: 18px;
    border-radius: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(34px, 14vw, 52px);
  }

  .hero-text {
    font-size: 15px;
  }

  .button {
    width: 100%;
  }
}
