:root {
  --paper: #f0eadc;
  --paper-deep: #ded3be;
  --ink: #171612;
  --muted: #686153;
  --line: rgba(23, 22, 18, 0.22);
  --accent: #c8462d;
  --accent-bright: #e66b42;
  --dark: #171b18;
  --dark-ink: #eee8dc;
  --display: "Songti SC", "STSong", "Noto Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --pad: clamp(20px, 4.5vw, 72px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(23, 22, 18, 0.035) 0 1px, transparent 1.5px),
    radial-gradient(circle at 70% 60%, rgba(23, 22, 18, 0.025) 0 1px, transparent 1.5px);
  background-size: 11px 13px, 17px 19px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 22px var(--pad);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.wordmark-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  font-size: 16px;
}

.header-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 79px);
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  grid-template-rows: 1fr auto;
  gap: 40px var(--pad);
  padding: clamp(60px, 9vw, 132px) var(--pad) 0;
  overflow: hidden;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 820px;
  align-self: center;
}

.eyebrow,
.section-index,
.figure-label {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 22px 0 28px;
  font-family: var(--display);
  font-size: clamp(54px, 8vw, 126px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.94;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
}

.hero-intro {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.8;
}

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

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--paper);
  background: var(--ink);
}

.button-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.button-quiet {
  background: transparent;
}

.button-quiet:hover {
  color: var(--paper);
  background: var(--ink);
}

.hero-figure {
  position: relative;
  min-height: 420px;
  align-self: center;
  border-left: 1px solid var(--line);
}

.orbit {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(28vw, 390px);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-two {
  width: min(19vw, 260px);
  border-color: var(--accent);
  border-style: dashed;
  animation: spin 24s linear infinite;
}

.waveform {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  width: min(26vw, 360px);
  height: 180px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transform: translate(-50%, -50%);
}

.waveform i {
  width: 3px;
  height: 28px;
  border-radius: 99px;
  background: var(--ink);
  animation: pulse 2.4s ease-in-out infinite;
}

.waveform i:nth-child(3n) {
  height: 86px;
  background: var(--accent);
}

.waveform i:nth-child(4n) {
  height: 52px;
  animation-delay: -0.8s;
}

.waveform i:nth-child(5n) {
  height: 118px;
  animation-delay: -1.3s;
}

.figure-label {
  position: absolute;
  right: 0;
  bottom: 34px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 24px;
  letter-spacing: 0;
  line-height: 1.15;
}

.hero-stats {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  border-top: 1px solid var(--line);
}

.hero-stats div {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 20px 0;
}

.hero-stats div + div {
  padding-left: var(--pad);
  border-left: 1px solid var(--line);
}

.hero-stats dt {
  font-family: var(--display);
  font-size: clamp(28px, 3vw, 44px);
}

.hero-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.catalog-section {
  display: grid;
  grid-template-columns: minmax(210px, 0.34fr) minmax(0, 0.66fr);
  gap: 48px var(--pad);
  padding: clamp(90px, 10vw, 150px) var(--pad);
  border-top: 1px solid var(--line);
}

.section-heading h2,
.mobile-guide h2 {
  margin: 12px 0 18px;
  font-family: var(--display);
  font-size: clamp(42px, 5.5vw, 82px);
  font-weight: 500;
  letter-spacing: -0.05em;
}

.section-heading > p {
  max-width: 340px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.lecture-list {
  min-width: 0;
}

.lecture-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  padding: 26px 0 28px;
  border-top: 1px solid var(--line);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.lecture-row:first-child {
  border-top: 2px solid currentColor;
}

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

.lecture-number {
  padding-top: 4px;
  color: var(--accent);
  font-family: var(--display);
  font-size: 17px;
}

.lecture-main {
  min-width: 0;
}

.lecture-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
}

.lecture-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(24px, 2.5vw, 38px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.25;
}

.lecture-focus {
  max-width: 650px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.download-button {
  display: inline-flex;
  min-width: 116px;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 16px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.download-button::after {
  content: "↓";
  font-size: 17px;
  transition: transform 180ms ease;
}

.download-button:hover {
  color: var(--paper);
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.download-button:hover::after {
  transform: translateY(3px);
}

.catalog-section-dark {
  color: var(--dark-ink);
  background: var(--dark);
  --line: rgba(238, 232, 220, 0.18);
  --accent: #ef7550;
  --muted: #aaa497;
}

.catalog-section-dark .download-button:hover {
  color: var(--dark);
  background: var(--accent);
}

.mobile-guide {
  padding: clamp(90px, 10vw, 150px) var(--pad);
  border-top: 1px solid var(--line);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 56px 0 0;
  padding: 0;
  border-top: 2px solid var(--ink);
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 26px 26px 26px 0;
}

.steps li + li {
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.steps > li > span {
  color: var(--accent);
  font-family: var(--display);
  font-size: 18px;
}

.steps h3 {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
}

.steps p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.download-utility {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.download-utility p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.utility-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.utility-links a {
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding: 28px var(--pad) 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.site-footer p {
  margin: 0;
}

.loading-row,
.error-message {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.error-message {
  color: var(--accent);
}

@keyframes pulse {
  0%, 100% { transform: scaleY(0.64); opacity: 0.5; }
  50% { transform: scaleY(1.1); opacity: 1; }
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding-bottom: 0;
  }

  .hero-figure {
    min-height: 300px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .orbit {
    width: min(62vw, 330px);
  }

  .orbit-two {
    width: min(44vw, 230px);
  }

  .waveform {
    width: min(70vw, 360px);
  }

  .catalog-section {
    grid-template-columns: 1fr;
  }

  .section-heading > p {
    max-width: 560px;
  }

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

  .steps li,
  .steps li + li {
    padding: 24px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .header-note {
    display: none;
  }

  .hero {
    gap: 20px;
    padding-top: 72px;
  }

  .hero h1 {
    font-size: clamp(48px, 16vw, 76px);
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .hero-stats div + div {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .lecture-row {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 12px;
  }

  .download-button {
    grid-column: 2;
    width: max-content;
    margin-top: 8px;
  }

  .download-utility,
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
