:root {
  color-scheme: light;
  --paper: #f7f4eb;
  --card: #fffcf5;
  --ink: #25372b;
  --muted: #526157;
  --forest: #263b30;
  --cream: #faf2dd;
  --accent: #875320;
  --line: #d9d5c6;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --serif: "Songti SC", "Noto Serif CJK SC", "Noto Serif SC", STSong, SimSun, serif;
  --gutter: clamp(1rem, 4vw, 3rem);
  --page-width: 74rem;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 1.5rem;
}

body {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.28;
}

a {
  color: inherit;
  text-underline-offset: .22em;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

img {
  display: block;
  max-width: 100%;
}

.shell {
  width: min(var(--page-width), calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 2;
  top: 1rem;
  left: 1rem;
  padding: .5rem 1rem;
  transform: translateY(-200%);
  border-radius: .25rem;
  background: var(--card);
}

.skip-link:focus {
  transform: none;
}

.header-row {
  display: flex;
  min-height: 5.25rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  font-family: var(--serif);
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 2rem;
  aspect-ratio: 1;
  flex: none;
  place-items: center;
  border-radius: .42rem;
  background: var(--forest);
  color: var(--cream);
}

.brand-mark::before {
  width: .99rem;
  height: .74rem;
  border: 1px solid currentColor;
  border-radius: .1rem .1rem .18rem .18rem;
  content: "";
}

.brand-mark::after {
  position: absolute;
  width: 1px;
  height: .74rem;
  background: currentColor;
  content: "";
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 4vw, 2.6rem);
  color: var(--muted);
  font-size: .94rem;
  white-space: nowrap;
}

.site-nav a {
  padding-block: .4rem;
  text-decoration-color: transparent;
}

.site-nav a:hover,
.back-link:hover {
  text-decoration-color: currentColor;
}

.hero {
  display: grid;
  min-height: clamp(24rem, 40vw, 33rem);
  grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr);
  overflow: hidden;
  border-radius: .65rem;
  background: var(--forest);
  color: var(--cream);
}

.hero-copy {
  display: flex;
  align-items: start;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5.4vw, 5rem);
}

.hero h1 {
  font-size: clamp(3rem, 5.3vw, 5rem);
  line-height: 1.08;
  letter-spacing: .045em;
}

.hero-copy p {
  max-width: 20rem;
  margin-block: 1.7rem 1.9rem;
  color: #e2decb;
  font-size: clamp(1rem, 1.45vw, 1.06rem);
  line-height: 1.8;
}

.hero-link {
  display: inline-flex;
  min-height: 2.8rem;
  align-items: center;
  padding: .54rem 1rem;
  border: 1px solid #e0d4b5;
  border-radius: .3rem;
  background: var(--cream);
  color: var(--forest);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}

.hero-link:hover {
  background: #eddbab;
}

.hero-link:focus-visible {
  outline-color: var(--cream);
}

.hero-photo {
  position: relative;
  min-height: 20rem;
  background: #897451;
}

.hero-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.notes-section {
  margin-top: clamp(3rem, 6vw, 5.3rem);
}

.section-title {
  margin-bottom: 1.5rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
}

.section-title h2,
.about-section h2 {
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  letter-spacing: .06em;
}

.note-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(.9rem, 2.4vw, 1.55rem);
}

.note-card {
  grid-column: span 2;
}

.note-card:nth-child(n + 4) {
  grid-column: span 3;
}

.note-card > a {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .45rem;
  background: var(--card);
  text-decoration: none;
}

.note-card > a:hover {
  border-color: #aa9c7d;
}

.note-card > a:hover h3 {
  text-decoration: underline;
}

.card-photo {
  overflow: hidden;
  aspect-ratio: 1.62;
  background: #e1d8c5;
}

.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note-card:nth-child(n + 4) .card-photo {
  aspect-ratio: 1.9;
}

.card-copy {
  flex: 1;
  padding: 1.35rem 1.3rem 1.55rem;
}

.category {
  color: var(--accent);
  font-size: .875rem;
  font-weight: 650;
  letter-spacing: .075em;
}

.card-copy h3 {
  margin-block: .45rem .5rem;
  font-size: clamp(1.22rem, 2vw, 1.52rem);
}

.card-copy p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.about-section {
  display: grid;
  grid-template-columns: minmax(9rem, .6fr) minmax(0, 1.4fr);
  gap: 1.4rem;
  align-items: baseline;
  margin-top: clamp(3rem, 6vw, 5.1rem);
  padding: clamp(1.4rem, 4vw, 3.25rem);
  border-top: 1px solid #cbd0bf;
  border-radius: .25rem;
  background: #e9ecdf;
}

.about-section p {
  max-width: 37rem;
  color: var(--muted);
  line-height: 1.9;
}

.site-footer {
  margin-top: auto;
  padding: clamp(3.25rem, 6vw, 4.75rem) var(--gutter) 1.75rem;
  text-align: center;
}

.site-footer a {
  display: inline-block;
  color: var(--muted);
  font-size: .85rem;
  text-decoration-color: #9b9e8f;
}

.site-footer a:hover {
  text-decoration-color: currentColor;
}

.article-shell {
  max-width: 54rem;
}

.article-header,
.article-body,
.article-next {
  width: min(100%, 41rem);
  margin-inline: auto;
}

.article-header {
  padding-block: clamp(1.4rem, 4vw, 3.1rem) 2rem;
}

.back-link {
  display: inline-block;
  color: var(--muted);
  font-size: .9rem;
  text-decoration-color: #9b9e8f;
}

.article-meta {
  margin-block: 1.6rem .6rem;
}

.article-header h1 {
  font-size: clamp(2rem, 4.9vw, 3.9rem);
  letter-spacing: .02em;
}

.article-summary {
  margin-top: 1rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.7vw, 1.12rem);
  line-height: 1.85;
}

.article-cover {
  width: 100%;
  height: auto;
  max-height: 31rem;
  border-radius: .45rem;
  background: #e1d8c5;
  object-fit: cover;
}

.article-body {
  padding-block: .55rem 0;
  color: #37483c;
  font-size: 1.02rem;
  line-height: 1.94;
}

.article-body h2 {
  margin-block: 2.55rem .65rem;
  color: var(--ink);
  font-size: 1.5rem;
}

.field-note {
  margin-block: 1.65rem;
  padding: 1.15rem 1.35rem;
  border-left: 2px solid #ac7946;
  background: #eee9d9;
}

.field-note h3 {
  margin-bottom: .5rem;
  color: var(--ink);
  font-size: 1.14rem;
}

.brew-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
  margin: .65rem 0 0;
}

.brew-details dt {
  color: var(--muted);
  font-size: .86rem;
}

.brew-details dd {
  margin: 0;
  font-weight: 650;
}

.article-next {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem 1rem;
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.article-next > span {
  color: var(--muted);
  font-size: .88rem;
}

.article-next a {
  font-weight: 600;
  text-decoration-color: #9b9e8f;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .card-photo img {
    transition: transform 220ms ease-out;
  }

  .note-card > a:hover img {
    transform: scale(1.035);
  }
}

@media (max-width: 50rem) {
  .header-row {
    min-height: 4.25rem;
  }

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

  .hero-copy {
    padding: clamp(1.8rem, 6vw, 3.7rem);
  }

  .hero-copy p {
    margin-block: 1.15rem 1.4rem;
  }

  .hero-photo {
    min-height: 0;
    aspect-ratio: 1.65;
  }

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

  .note-card,
  .note-card:nth-child(n + 4) {
    grid-column: auto;
  }

  .note-card:nth-child(n + 4) .card-photo {
    aspect-ratio: 1.62;
  }
}

@media (max-width: 36rem) {
  .brand {
    gap: .45rem;
    font-size: 1rem;
  }

  .brand-mark {
    width: 1.7rem;
  }

  .site-nav {
    font-size: .88rem;
  }

  .note-grid,
  .about-section {
    grid-template-columns: 1fr;
  }

  .about-section {
    gap: .65rem;
  }

  .article-header {
    padding-bottom: 1.25rem;
  }

  .article-body h2 {
    margin-top: 2rem;
    font-size: 1.31rem;
  }
}
