@font-face {
  font-family: "Noto Sans SC";
  src: url("noto-sans-sc.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --ink: #202d26;
  --paper: #f0f1e8;
  --lake: #bacfd3;
  --leaf: #c8d28d;
  --wood: #34453b;
  --night: #332b2c;
  --gutter: clamp(18px, 4vw, 64px);
  --body: clamp(1rem, .94rem + .26vw, 1.125rem);
  --lead: clamp(1.25rem, 1rem + 1vw, 2rem);
  --head: clamp(2.25rem, 6.1vw, 6rem);
  --title: clamp(4rem, 11vw, 10rem);
  --ease: cubic-bezier(.2, .75, .25, 1);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 var(--body)/1.65 "Noto Sans SC", sans-serif; }
h1, h2, h3, p, dl, dd { margin: 0; }
h1, h2, h3 { line-height: 1.08; font-weight: 800; }
h1 { font-size: var(--title); letter-spacing: -.06em; }
h2 { font-size: var(--head); letter-spacing: -.055em; }
h3, dt { font-size: var(--lead); line-height: 1.23; font-weight: 750; }
a { color: inherit; text-underline-offset: .21em; }
a:hover { text-decoration-thickness: .15em; }
button, code, kbd { font: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 4px; }
.skip { position: fixed; z-index: 3; inset: 8px auto auto 12px; padding: 10px 16px; background: var(--leaf); color: var(--ink); transform: translateY(-150%); }
.skip:focus { transform: none; }
.wrap { width: calc(100% - 2 * var(--gutter)); max-width: 1520px; margin-inline: auto; }
.top { display: flex; background: var(--ink); color: var(--paper); padding-inline: var(--gutter); }
.top a { display: inline-flex; align-items: center; min-height: 56px; text-decoration: none; font-weight: 700; }
.top a:hover { text-decoration: underline; }
.brand { padding-right: clamp(18px, 4vw, 58px); white-space: nowrap; }
.top nav { display: flex; align-items: center; justify-content: space-around; gap: 8px; width: clamp(230px, 32vw, 480px); padding-inline: 12px; background: var(--lake); color: var(--ink); }
.top nav a { padding-inline: 8px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 52px;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 750;
}
.button:hover { background: var(--wood); }
.button:focus-visible { outline-color: var(--ink); }

.hero { min-height: calc(100svh - 56px); }
.masthead { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: 56% 44%; height: clamp(290px, 52svh, 560px); background: var(--lake); }
.village { grid-area: 1 / 1 / 3 / 10; }
.sky { grid-area: 1 / 10 / 2 / 13; }
.field-lake { grid-area: 2 / 10 / 3 / 11; background: var(--lake); }
.field-leaf { grid-area: 2 / 11 / 3 / 12; background: var(--leaf); }
.field-wood { grid-area: 2 / 12 / 3 / 13; background: var(--wood); }
.crop { overflow: hidden; }
.crop img { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.village img { object-position: 48% 50%; }
.sky img { object-position: 59% 50%; }
.hero-text { display: grid; grid-template-columns: 5fr 7fr; align-items: center; gap: 28px 36px; padding-block: clamp(28px, 5svh, 68px) 30px; }
.hero h1 { grid-column: 2; grid-row: 1; overflow: hidden; padding-block: .07em .13em; }
.hero h1 span { display: block; }
.hero-intro { grid-column: 1; grid-row: 1; max-width: 28em; }
.lead { font-size: var(--lead); line-height: 1.35; font-weight: 750; }
.hero-intro p + p { margin-top: 10px; }
.keep { white-space: nowrap; }
.hero-intro .button { margin-top: 16px; }
.server-state { display: flex; flex-wrap: wrap; gap: 2px 20px; grid-column: 1 / -1; }
#server-status { font-weight: 750; font-variant-numeric: tabular-nums; }

.join { background: var(--lake); }
.chapter { padding-block: clamp(50px, 8vw, 120px); }
.steps { display: grid; grid-template-columns: 3fr 4fr 5fr; align-items: end; gap: 10px; padding: 0; margin: 30px 0 0; list-style: none; }
.steps li { min-width: 0; background: var(--paper); padding: clamp(16px, 2.2vw, 33px); }
.steps li:first-child { min-height: 15rem; }
.steps li:nth-child(2) { min-height: 20rem; background: var(--leaf); }
.steps li:nth-child(3) { min-height: 25rem; background: var(--ink); color: var(--paper); }
.steps h3, .story h3 { margin-bottom: .55em; }
.addresses { display: grid; gap: 8px; margin-top: 20px; }
.addresses > div { padding: 8px 12px; background: var(--wood); }
.addresses dt { font-size: inherit; }
.addresses dd { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; }
.addresses code { user-select: all; overflow-wrap: anywhere; }
.addresses button { min-height: 44px; border: 0; padding-inline: 12px; background: var(--leaf); color: var(--ink); cursor: pointer; font-weight: 750; }
.addresses button:hover { background: var(--paper); }
.feedback { overflow-wrap: anywhere; }
.feedback:not(:empty) { margin-top: 10px; }

.play, .day { background: var(--leaf); }
.play-head { padding-block: clamp(42px, 6vw, 90px) clamp(24px, 3vw, 44px); }
.play-fields { display: grid; grid-template-columns: 1fr 1fr; }
.play-fields article { display: flex; flex-direction: column; min-width: 0; }
.play .crop { height: clamp(280px, 37vw, 560px); }
.day img { object-position: 33% 50%; }
.night img { object-position: 43% 66%; }
.night { background: var(--night); color: var(--paper); }
.story { padding: clamp(30px, 4.5vw, 72px) var(--gutter); }
.story p { max-width: 36em; }
.collection { background: var(--wood); color: var(--paper); }
.collection-grid { display: grid; grid-template-columns: 4fr 8fr; align-items: center; gap: clamp(20px, 4vw, 62px); padding-block: clamp(42px, 6.5vw, 92px); }
.collection .story { padding: 0; }
.machines { background: var(--night); }
.reverse .collection-grid { grid-template-columns: 8fr 4fr; }
.collection .crop { width: 100%; min-width: 0; height: auto; aspect-ratio: 1.85; }
.collection img { transform: translateY(-3%); height: 106%; }
.faq-head { padding-block: clamp(44px, 7vw, 104px); background: var(--paper); }
.answer { display: grid; grid-template-columns: 5fr 7fr; gap: 16px 36px; padding: clamp(28px, 4.3vw, 62px) max(var(--gutter), calc((100% - 1520px) / 2)); background: var(--lake); }
.answer:nth-child(even) { background: var(--paper); }
.answer dd { max-width: 40em; }
.footer { background: var(--wood); color: var(--paper); padding-block: var(--gutter); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; }
.footer-name { background: var(--ink); padding: clamp(24px, 4vw, 60px); }
.footer-name p { font-size: var(--head); line-height: 1.14; font-weight: 800; letter-spacing: -.06em; }
.footer-links { display: grid; align-content: space-between; justify-items: start; gap: 14px; background: var(--leaf); color: var(--ink); padding: clamp(20px, 3vw, 42px); }
.footer-links > a:first-child { display: inline-flex; align-items: center; min-height: 44px; }
.footer-links .button { white-space: nowrap; gap: 12px; }
.not-found { padding-block: 70px; }
.not-found h1 { font-size: var(--head); margin-bottom: 24px; }

@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
  .steps li:nth-child(n) { min-height: 0; }
  .steps li { padding: 24px; }
  .steps li:first-child { width: min(100%, 34em); }
  .steps li:nth-child(2) { width: min(100%, 40em); }
  .addresses { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 590px) {
  .top nav { flex: 1; width: auto; padding-inline: 4px; gap: 2px; }
  .top a { min-height: 50px; }
  .hero { min-height: calc(100svh - 50px); }
  .masthead { height: clamp(220px, 40svh, 350px); grid-template-columns: repeat(6, 1fr); }
  .village { grid-area: 1 / 1 / 3 / 5; }
  .village img { object-position: 40% 50%; }
  .sky { grid-area: 1 / 5 / 2 / 7; }
  .field-lake { grid-area: 2 / 5 / 3 / 6; }
  .field-leaf { grid-area: 2 / 6 / 3 / 7; }
  .field-wood { display: none; }
  .hero-text { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding-block: 34px 25px; }
  .hero h1 { padding-bottom: .09em; }
  .hero .button { width: 100%; }
  .server-state { justify-content: space-between; }
  .steps { margin-top: 22px; }
  .steps li { padding: 20px; }
  .steps li:first-child { width: 91%; }
  .steps li:nth-child(2) { width: 96%; }
  .addresses, .play-fields, .answer, .footer-grid, .collection-grid { grid-template-columns: 1fr; }
  .play .crop { height: clamp(230px, 68vw, 360px); }
  .collection-grid, .reverse .collection-grid { grid-template-columns: minmax(0, 1fr); }
  .reverse .story { order: -1; }
  .collection .crop { height: auto; }
  .footer { padding-top: 60px; }
  .footer-links { justify-items: stretch; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero h1 span { animation: title-enter 720ms var(--ease) both; }
  .hero-intro, .server-state { animation: rise 550ms var(--ease) both; }
  .server-state { animation-delay: 85ms; }
  .village img { animation: picture-settle 2.4s var(--ease) both; }
  [data-rise].in-view { animation: rise 520ms var(--ease) both; }
  [data-rise].in-view:nth-child(2) { animation-delay: 75ms; }
  [data-rise].in-view:nth-child(3) { animation-delay: 150ms; }
  a, button { transition: transform 160ms var(--ease); }
  .button:hover, button:hover { transform: translateY(-2px); }
  .button:active, button:active { transform: translateY(1px); }
}

@keyframes title-enter { from { transform: translateY(.4em); } }
@keyframes rise { from { transform: translateY(16px); opacity: .72; } }
@keyframes picture-settle { from { transform: scale(1.10); } }
