@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-edition.woff2") format("woff2");
  font-style: normal;
  font-weight: 430;
  font-display: swap;
}

:root {
  --canvas: #f3f2ea;
  --ink: #202d22;
  --muted: #4a594e;
  --pine: #20382c;
  --deep: #17271e;
  --line: #bbc3b0;
  --wheat: #d8c48d;
  --sage: #e5e9dd;
  --display: "Source Serif 4", Georgia, serif;
  --paper: var(--canvas);
  --gutter: clamp(20px, 4.8vw, 72px);
  --page-width: 1360px;
  --radius: 2px;
  --header: 76px;
  --space: clamp(54px, 7.2vw, 110px);
}

h1, h2, main h3 { font-family: var(--display); font-weight: 555; letter-spacing: -.035em; }
h2 { line-height: 1.04; }
main h3 { line-height: 1.12; }
:focus-visible { outline-color: #895019; }

.site-header {
  background: var(--canvas);
  border-bottom-color: #c9ccbd;
}
.site-header .brand { gap: 10px; }
.site-header .brand > span { font-size: clamp(1.23rem, 1.95vw, 1.72rem); letter-spacing: -.07em; }
.site-header .brand img { width: 31px; }
.site-header .brand small { font-size: .72rem; color: #485647; }
.desktop-nav a { font-weight: 670; }
.header-tools > .header-contact {
  min-height: 41px;
  border: 1px solid #7b8a78;
  background: transparent;
  color: var(--ink);
  padding-inline: 19px;
}
.header-tools > .header-contact:hover { background: var(--pine); color: white; border-color: var(--pine); }

#hero { background: var(--canvas); color: #faf8ef; }
.farm-story {
  --chapter-distance: clamp(100px, 20svh, 170px);
  --stage-offset: 10px;
  --frame-min: clamp(455px, calc(100svh - 168px), 715px);
  padding-block: clamp(10px, 2vw, 28px) 0;
}
.farm-story.shell { width: min(100% - clamp(24px, 5.5vw, 86px), 1480px); }
.farm-story.has-farm-stage { display: grid; grid-template-columns: minmax(0, 1fr); }
.farm-stage, .has-farm-stage .farm-chapters { grid-area: 1 / 1; min-width: 0; }
.farm-chapter { background: var(--deep); }
.has-farm-stage .farm-chapter { background: none; }
.farm-stage {
  background: var(--canvas);
  color: var(--ink);
  z-index: 2;
  min-width: 0;
}
.has-farm-stage .farm-stage {
  position: sticky;
  top: calc(var(--header) + var(--stage-offset));
  align-self: start;
}
.has-farm-stage .farm-chapters { pointer-events: none; }
.has-farm-stage .farm-chapter { min-block-size: var(--chapter-distance); }
.has-farm-stage .farm-chapter:last-child {
  min-block-size: calc(var(--farm-stage-height, 600px) + var(--chapter-distance) / 2);
}

.farm-screen-wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  isolation: isolate;
}
.has-farm-stage .farm-screen-wrap {
  min-block-size: var(--frame-min);
  background: var(--deep);
}
.farm-screen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--deep);
}
.farm-screen::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(90deg, #17271e 5%, #17271e 19%, #17271ef7 26%,
    #17271ecf 37%, #17271e68 49%, #17271e10 63%, transparent 72%);
}
.farm-visual {
  position: relative;
  margin: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--deep);
}
.farm-visual img, .farm-visual video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.farm-visual video { opacity: 0; }
.farm-visual.is-playing video { opacity: 1; }
.farm-visual.is-playing img { opacity: 0; }
.farm-visual.farm-portrait img { object-position: 50% 56%; }
.farm-screen .farm-visual {
  position: absolute;
  inset: 0 0 0 23%;
  aspect-ratio: auto;
  opacity: 0;
  transition: opacity 380ms ease;
}
.farm-screen .farm-visual.is-current { z-index: 1; opacity: 1; }
.farm-screen .farm-visual:first-child img,
.farm-screen .farm-visual:first-child video { object-position: 55% 50%; }
.motion-paused .farm-screen .farm-visual { transition: none; }

.farm-stage-copy {
  z-index: 2;
  display: grid;
  grid-area: 1 / 1;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  align-self: stretch;
  padding: clamp(36px, 5.6vw, 82px);
  color: #fbf9f0;
}
.farm-stage-copy .farm-copy {
  visibility: hidden;
  grid-area: 1 / 1;
  max-width: min(43vw, 565px);
}
.farm-stage-copy .farm-copy.is-current { visibility: visible; }
.farm-story .hero-place {
  gap: .55em;
  margin-bottom: 17px;
  color: var(--wheat);
  font-size: .98rem;
  font-weight: 720;
}
.farm-story h1 {
  max-width: 15ch;
  font-size: clamp(2.6rem, 5.9vw, 5.7rem);
  font-weight: 560;
  letter-spacing: -.048em;
  line-height: .98;
  text-wrap: balance;
}
.farm-copy h2 {
  max-width: 15ch;
  font-size: clamp(2.5rem, 5.3vw, 5.15rem);
  line-height: .99;
}
.farm-story .hero-intro {
  max-width: 38ch;
  color: #f3f1e7;
  font-size: clamp(1rem, 1.45vw, 1.19rem);
  line-height: 1.58;
}
.farm-story .actions { gap: 9px 23px; }
.farm-story .actions .primary {
  border-radius: 2px;
  background: var(--wheat);
  color: #242a1d;
  padding-inline: 18px;
}
.farm-story .actions .primary:hover { background: #ecdcab; }
.farm-story .actions .quiet { text-decoration-color: #d8c48de0; }

.farm-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 3vw, 40px);
  border: 1px solid var(--line);
  border-top: 0;
  padding-inline: clamp(8px, 2.3vw, 33px);
}
.farm-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(5px, 1.4vw, 24px);
  margin-block: 0 -1px;
}
.farm-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 56px;
  padding-block: 8px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  font-size: .93rem;
  font-weight: 680;
  line-height: 1.22;
  text-align: center;
  overflow-wrap: anywhere;
}
.farm-links a[aria-current] {
  border-bottom-color: #546447;
  color: var(--ink);
  font-weight: 790;
}
.farm-links a:hover { color: var(--ink); background: #dfe4d6; }
.farm-exit { display: none; }
.farm-controls {
  display: flex;
  align-items: center;
  color: var(--ink);
  border-left: 1px solid var(--line);
  padding-inline-start: clamp(4px, 1.1vw, 15px);
}
.farm-controls button {
  border: 0;
  border-radius: 0;
  color: inherit;
}
.farm-controls button:hover { background: #dfe4d6; }
.farm-rail :focus-visible { outline-color: #895019; outline-offset: -4px; }
.farm-stage-copy :focus-visible { outline-color: var(--wheat); }

.farm-story:not(.has-farm-stage) { padding-bottom: 20px; }
.farm-story:not(.has-farm-stage) .farm-rail { border-top: 1px solid var(--line); margin-bottom: 16px; }
.farm-story:not(.has-farm-stage) .farm-chapter {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  align-items: center;
  gap: clamp(18px, 4vw, 56px);
  padding: clamp(23px, 4vw, 56px);
  margin-bottom: 16px;
}
.farm-story:not(.has-farm-stage) .hero-intro { margin-top: 12px; }

@media (max-width: 959px) {
  :root { --header: 65px; }
}
@media (max-width: 760px) {
  .farm-story { --chapter-distance: clamp(105px, 16svh, 138px); --stage-offset: 5px; }
  .farm-story.shell { width: calc(100% - 24px); }
  .has-farm-stage .farm-screen-wrap { grid-template-rows: auto auto; min-block-size: 0; }
  .farm-screen { position: relative; grid-area: 1 / 1; isolation: isolate; aspect-ratio: 1.65; max-height: 34svh; }
  .farm-screen::after { display: none; }
  .farm-screen .farm-visual { inset: 0; }
  .farm-stage-copy {
    grid-area: 2 / 1;
    align-items: start;
    padding: clamp(15px, 4.7vw, 27px);
  }
  .farm-stage-copy .farm-copy { max-width: 100%; }
  .farm-story .hero-place { margin-bottom: 8px; font-size: .89rem; }
  .farm-story h1 { font-size: clamp(2.13rem, 7.1vw, 3.45rem); max-width: 17ch; }
  .farm-copy h2 { font-size: clamp(2.1rem, 7vw, 3.4rem); }
  .farm-story .hero-intro { margin-top: 10px; font-size: 1rem; }
  .farm-story .actions { margin-top: 11px; gap: 3px 18px; }
  .farm-rail { grid-template-columns: minmax(0, 1fr); gap: 0; padding-inline: 9px; }
  .farm-links { gap: 3px; }
  .farm-links a { font-size: .875rem; min-height: 45px; }
  .farm-controls { border-left: 0; border-top: 1px solid var(--line); padding-inline-start: 0; }
  .farm-exit {
    display: grid;
    align-items: center;
    min-height: 44px;
    margin-right: auto;
    color: var(--muted);
    font-size: .875rem;
    font-weight: 740;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
  .farm-story:not(.has-farm-stage) .farm-chapter { display: flex; flex-direction: column; align-items: stretch; }
  .farm-story:not(.has-farm-stage) .farm-visual { order: -1; }
}
@media (max-width: 760px) and (max-height: 720px) {
  .farm-screen { max-height: 22.5svh; }
  .farm-stage-copy { padding-block: 13px; }
}
@media (max-width: 355px) {
  .farm-story.shell { width: calc(100% - 16px); }
  .farm-controls button { width: 38px; }
  .farm-links a { padding-inline: 1px; }
}
@media (prefers-reduced-motion: reduce) {
  .farm-screen .farm-visual { transition: none; }
  .farm-controls .motion { display: none; }
}
@media print {
  #hero, .farm-story:not(.has-farm-stage) .farm-chapter { background: white; color: black; }
  .farm-story.has-farm-stage { display: block; }
  .has-farm-stage .farm-stage { position: static; }
  .has-farm-stage .farm-chapters, .farm-rail, .farm-visual video { display: none; }
  .farm-visual.is-playing img { opacity: 1; }
  .farm-story .hero-intro { color: inherit; }
}
