:root {
  --bg: #fffdf7;
  --bg-soft: #f7f3ea;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-soft: rgba(255, 251, 240, 0.9);
  --border: rgba(217, 119, 6, 0.18);
  --border-strong: rgba(217, 119, 6, 0.4);
  --text: #1f2937;
  --muted: #6b7280;
  --gold: #d97706;
  --gold-soft: #b45309;
  --blue: #2563eb;
  --blue-soft: rgba(37, 99, 235, 0.08);
  --shadow: 0 24px 60px rgba(148, 163, 184, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --content-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
    radial-gradient(circle at top right, rgba(217, 119, 6, 0.1), transparent 22%),
    linear-gradient(180deg, #fffdf8 0%, #faf7f1 42%, #f5f1e8 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(180, 83, 9, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180, 83, 9, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 92%);
  opacity: 0.55;
}

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

.page-shell {
  position: relative;
  padding: 28px 20px 40px;
}

.topbar,
.section,
.footer {
  width: min(100%, var(--content-width));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  padding: 8px;
  border-radius: 20px;
  border: 1px solid rgba(217, 119, 6, 0.08);
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(148, 163, 184, 0.14);
}

.brand-text {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-text strong {
  box-sizing: content-box;
  color: #111827;
  font-family: "Songti SC";
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  border: none;
  background: transparent;
}

.brand-text small,
.topnav a,
.card-code,
.card-badge,
.resource-pill {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.brand-text small {
  color: var(--muted);
  padding-left: 16px;
  border-left: 1px solid rgba(217, 119, 6, 0.18);
  font-size: 25px;
  font-family: "Songti SC";
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  max-width: 28rem;
  line-height: 1.35;
}

.topnav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px);
}

.topnav a {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.74rem;
  color: var(--muted);
  transition:
    background-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--text);
  background: rgba(217, 119, 6, 0.08);
  transform: translateY(-1px);
}

.academy-card,
.resource-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(217, 119, 6, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 250, 241, 0.96));
  box-shadow: var(--shadow);
}

.academy-card::after,
.resource-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -45% auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.12), transparent 68%);
  filter: blur(12px);
  pointer-events: none;
}

.resource-card h3,
.academy-card h3 {
  margin: 0;
  line-height: 1.08;
  font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
  font-weight: 700;
}

.section-heading p,
.card-summary,
.resource-card p {
  color: var(--muted);
  line-height: 1.8;
}

.button,
.card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 152px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 600;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease,
    background-color 180ms ease;
}

.button:hover,
.button:focus-visible,
.card-link:hover,
.card-link:focus-visible {
  transform: translateY(-2px);
}

.button-primary,
.card-link {
  border: 1px solid rgba(217, 119, 6, 0.18);
  color: #fffaf2;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.92), rgba(234, 88, 12, 0.92));
  box-shadow: 0 14px 30px rgba(217, 119, 6, 0.16);
}

.button-secondary {
  border: 1px solid rgba(217, 119, 6, 0.16);
  background: rgba(255, 247, 237, 0.92);
  color: var(--text);
}

.card-meta dt {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.card-meta dd {
  margin: 0;
}

.section {
  margin-bottom: 30px;
  padding: 18px 34px 34px;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(217, 119, 6, 0.08);
}

.section-heading {
  max-width: 720px;
  margin-bottom: 18px;
}

.section-heading h2 {
  font-family: "Songti SC";
  font-size: 36px;
}

.section-heading p {
  margin: 14px 0 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.academy-card,
.resource-card {
  border-radius: var(--radius-lg);
}

.academy-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.academy-card:hover,
.academy-card:focus-within {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow:
    0 26px 60px rgba(148, 163, 184, 0.2),
    0 0 0 1px rgba(217, 119, 6, 0.08);
}

.card-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-code,
.card-badge,
.resource-pill {
  color: var(--gold);
  font-size: 0.7rem;
}

.card-badge,
.resource-pill {
  padding: 8px 12px;
  border: 1px solid rgba(217, 119, 6, 0.16);
  border-radius: 999px;
  background: rgba(255, 247, 237, 0.95);
  white-space: nowrap;
}

.academy-card h3,
.resource-card h3 {
  font-size: 1.9rem;
}

.card-alias {
  margin: -6px 0 0;
  color: var(--blue);
  font-size: 0.95rem;
}

.card-summary {
  margin: 0;
}

.card-meta {
  display: grid;
  gap: 12px;
  margin: 0;
}

.card-meta div {
  padding: 14px 16px;
  border: 1px solid rgba(217, 119, 6, 0.08);
  border-radius: 16px;
  background: rgba(255, 251, 240, 0.88);
}

.card-link {
  margin-top: auto;
}

.resource-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}

.resource-card p {
  margin: 10px 0 0;
  max-width: 72ch;
}

.embed-shell {
  overflow: hidden;
  border: 1px solid rgba(217, 119, 6, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.embed-shell iframe {
  display: block;
  width: 100%;
  min-height: 700px;
  border: 0;
  background: #ffffff;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 0 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer p {
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 520ms ease,
    transform 520ms ease;
}

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

:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 4px;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  color: #fff;
}

@keyframes pulseGlow {
  0%,
  100% {
    transform: scale(0.94);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.92;
  }
}

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

  .footer {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .page-shell {
    padding-inline: 14px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topnav {
    justify-content: center;
    flex-wrap: wrap;
  }

  .section,
  .academy-card,
  .resource-card {
    border-radius: 24px;
  }

  .section {
    padding: 22px;
  }

  .brand-text {
    align-items: flex-start;
    gap: 8px;
  }

  .brand-text strong {
    font-size: 1.45rem;
  }

  .brand-text small {
    padding-left: 0;
    border-left: 0;
    font-size: 0.82rem;
    max-width: 100%;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .resource-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .embed-shell iframe {
    min-height: 620px;
  }

  .academy-card h3,
  .resource-card h3 {
    font-size: 1.6rem;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0ms !important;
  }

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