:root {
  --ink: #152d29;
  --ink-soft: #52615e;
  --paper: #f5f6f1;
  --white: #fffdf8;
  --green: #173d35;
  --mint: #b9cfbf;
  --coral: #ed755d;
  --blue: #5e8092;
  --line: rgba(21, 45, 41, 0.17);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  text-rendering: optimizeLegibility;
}

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

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--white);
  color: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  display: flex;
  width: 100%;
  height: 88px;
  align-items: center;
  justify-content: space-between;
  padding: 0 5.5%;
  color: var(--white);
  transition: background-color 220ms ease, color 220ms ease, height 220ms ease;
}

.site-header.is-scrolled {
  height: 68px;
  background: rgba(245, 246, 241, 0.94);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
  backdrop-filter: blur(12px);
}

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

.brand-symbol {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
  color: var(--white);
  font-family: "Songti SC", STSong, serif;
  font-size: 18px;
}

nav {
  display: flex;
  gap: 38px;
  font-size: 14px;
}

nav a {
  position: relative;
  padding: 8px 0;
}

nav a::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 180ms ease;
}

nav a:hover::after,
nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.hero {
  position: relative;
  display: flex;
  min-height: 88svh;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(13, 37, 33, 0.9), rgba(13, 37, 33, 0.38) 48%, rgba(13, 37, 33, 0.02) 77%),
    url("assets/hero.webp") center center / cover no-repeat;
  color: var(--white);
}

.hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), transparent 50%, rgba(0, 0, 0, 0.24));
  content: "";
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, 89%);
  margin: 72px auto 0;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 650;
}

.hero h1 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", STSong, serif;
  font-size: 96px;
  font-weight: 500;
  line-height: 1.08;
}

.hero-copy {
  max-width: 470px;
  margin: 28px 0 30px;
  font-size: 19px;
  line-height: 1.85;
}

.primary-link {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  gap: 36px;
  border: 1px solid rgba(255, 253, 248, 0.65);
  padding: 0 20px;
  font-size: 14px;
  transition: background-color 180ms ease, color 180ms ease;
}

.primary-link span {
  font-size: 17px;
  transition: transform 180ms ease;
}

.primary-link:hover,
.primary-link:focus-visible {
  background: var(--white);
  color: var(--green);
}

.primary-link:hover span,
.primary-link:focus-visible span {
  transform: translate(3px, 3px);
}

.hero-side-note {
  position: absolute;
  z-index: 1;
  right: 5.5%;
  bottom: 32px;
  margin: 0;
  font-size: 12px;
  opacity: 0.75;
  writing-mode: vertical-rl;
}

.hero-rise {
  opacity: 0;
  transform: translateY(22px);
  animation: hero-rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}

.hero-rise:nth-child(2) {
  animation-delay: 90ms;
}

.hero-rise:nth-child(3) {
  animation-delay: 180ms;
}

.hero-rise:nth-child(4) {
  animation-delay: 270ms;
}

@keyframes hero-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  width: min(1180px, 89%);
  margin: 0 auto;
  padding: 145px 0;
}

.method {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.62fr);
  gap: 56px 90px;
}

.section-title h2,
.month-heading h2 {
  margin: 0;
  font-family: "Songti SC", "Noto Serif CJK SC", STSong, serif;
  font-size: 49px;
  font-weight: 500;
  line-height: 1.4;
}

.section-copy {
  align-self: end;
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 2;
}

.principles {
  display: grid;
  margin: 40px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, 1fr);
  list-style: none;
}

.principles li {
  min-height: 260px;
  border-right: 1px solid var(--line);
  padding: 32px 42px 32px 0;
}

.principles li + li {
  padding-left: 42px;
}

.principles li:last-child {
  border-right: 0;
}

.principles span {
  color: var(--coral);
  font-size: 12px;
}

.principles h3 {
  margin: 55px 0 15px;
  font-family: "Songti SC", STSong, serif;
  font-size: 27px;
  font-weight: 500;
}

.principles p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.85;
}

.month {
  background: var(--green);
  color: var(--white);
}

.month-inner {
  display: grid;
  width: min(1180px, 89%);
  margin: 0 auto;
  grid-template-columns: minmax(0, 0.82fr) minmax(420px, 1fr);
  gap: 100px;
  padding: 145px 0;
}

.month-heading > p:last-child {
  max-width: 470px;
  margin: 35px 0 0;
  color: rgba(255, 253, 248, 0.68);
  font-size: 16px;
  line-height: 1.95;
}

.ledger {
  align-self: center;
  border-top: 1px solid rgba(255, 253, 248, 0.28);
  padding-top: 22px;
}

.ledger-head,
.ledger-row {
  display: grid;
  align-items: center;
  grid-template-columns: 110px minmax(120px, 1fr) 48px;
  gap: 22px;
}

.ledger-head {
  grid-template-columns: 1fr auto;
  margin-bottom: 38px;
  color: rgba(255, 253, 248, 0.65);
  font-size: 12px;
}

.ledger-row {
  margin: 25px 0;
  font-size: 14px;
}

.ledger-row > div {
  height: 6px;
  background: rgba(255, 253, 248, 0.13);
}

.ledger-row i {
  display: block;
  height: 100%;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ledger-row .bar-42 {
  width: 42%;
}

.ledger-row .bar-26 {
  width: 26%;
}

.ledger-row .bar-19 {
  width: 19%;
}

.ledger-row .bar-13 {
  width: 13%;
}

.ledger.is-visible .ledger-row i {
  transform: scaleX(1);
}

.ledger-row strong {
  font-size: 13px;
  font-weight: 500;
  text-align: right;
}

.ledger-note {
  margin: 48px 0 0;
  color: rgba(255, 253, 248, 0.52);
  font-size: 12px;
}

.notes {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1fr);
  gap: 90px;
}

.note-list {
  border-top: 1px solid var(--line);
}

.note-list article {
  display: grid;
  min-height: 190px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 70px 1fr;
  gap: 24px;
  padding: 34px 0;
}

.note-list time {
  color: var(--coral);
  font-size: 12px;
}

.note-list h3 {
  margin: 0 0 14px;
  font-family: "Songti SC", STSong, serif;
  font-size: 24px;
  font-weight: 500;
}

.note-list p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.9;
}

footer {
  display: flex;
  min-height: 250px;
  align-items: flex-end;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 58px 5.5%;
}

.footer-brand {
  margin-bottom: 18px;
}

footer p,
.footer-meta {
  color: var(--ink-soft);
  font-size: 13px;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-meta a {
  border-bottom: 1px solid var(--line);
  padding-bottom: 3px;
}

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

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

@media (max-width: 800px) {
  .site-header {
    height: 70px;
    padding: 0 22px;
  }

  .site-header.is-scrolled {
    height: 62px;
  }

  nav {
    display: none;
  }

  .brand-symbol {
    width: 34px;
    height: 34px;
  }

  .hero {
    min-height: 82svh;
    background-position: 60% center;
  }

  .hero-content {
    width: calc(100% - 44px);
    margin-top: 54px;
  }

  .hero h1 {
    font-size: 59px;
  }

  .hero-copy {
    max-width: 310px;
    font-size: 17px;
  }

  .hero-side-note {
    display: none;
  }

  .section {
    width: calc(100% - 44px);
    padding: 92px 0;
  }

  .method,
  .notes {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .section-title h2,
  .month-heading h2 {
    font-size: 35px;
  }

  .section-copy {
    font-size: 16px;
  }

  .principles {
    grid-template-columns: 1fr;
    margin-top: 15px;
  }

  .principles li,
  .principles li + li {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 30px 0;
  }

  .principles h3 {
    margin: 24px 0 10px;
  }

  .month-inner {
    width: calc(100% - 44px);
    grid-template-columns: 1fr;
    gap: 70px;
    padding: 94px 0;
  }

  .ledger-head,
  .ledger-row {
    grid-template-columns: 88px minmax(80px, 1fr) 40px;
    gap: 14px;
  }

  .ledger-head {
    grid-template-columns: 1fr auto;
  }

  .notes {
    gap: 60px;
  }

  .note-list article {
    grid-template-columns: 58px 1fr;
  }

  footer {
    min-height: 290px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: space-between;
    padding: 52px 22px 38px;
  }

  .footer-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

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

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

  .hero-rise,
  .reveal {
    opacity: 1;
    transform: none;
  }

  .ledger-row i {
    transform: scaleX(1);
  }
}
