:root {
  --gutter: 20px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --topbar-h: 60px;
}

body { font-size: clamp(15px, 4.6vw, 17px); }
.btn { white-space: normal; padding: 10px 16px; text-align: center; text-wrap: balance; line-height: 1.2; }
.hero__copy, .stop, .word, .news__form, .volunteer__wall, .foot { text-align: center; }
.word, .volunteer__wall, .foot__inner { justify-items: center; }
.word p, .volunteer__wall > p, .foot__line { margin-left: auto; margin-right: auto; }
.chalk { justify-content: center; }
.foot__links { justify-content: center; }
.foot__links a, .foot__col a, .foot__copyaddr { justify-content: center; text-align: center; }
.foot__logo { margin: 0 auto; }
.line { display: block; text-wrap: balance; }
* { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
.hen, .pony, .pig, .pal, .calf, .donkey, .meter__pig { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; outline: 0; background-color: transparent; }

.ground--hero { background-image: url(../art/bg-hero-phone.webp); }
.ground--goal { background-image: url(../art/bg-goal-phone.webp); }
.ground--barn { background-image: url(../art/bg-barn-phone-empty.webp); }
.ground--pond { background-image: url(../art/bg-pond-phone.webp); }

.top {
  height: calc(var(--topbar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0;
  justify-content: space-between;
  background: rgb(252 233 200 / .82);
  -webkit-backdrop-filter: blur(3px) saturate(1.4); backdrop-filter: blur(3px) saturate(1.4);
  box-shadow: inset 0 -1px 0 rgb(255 255 255 / .8), 0 1px 0 rgb(30 53 80 / .14);
}
.top__logo img, .top.is-stuck .top__logo img { width: 48px; }
.top__nav, .top__donate { display: none; }
.top__menu {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border: 2px solid var(--ink); border-radius: 3px; background: var(--print);
  font: 700 16px/1 var(--body); color: var(--ink);
}
.top__menu:active { transform: scale(.97); }

main { padding-bottom: 0; }

.hero { display: block; min-height: 0; padding: calc(var(--topbar-h) + 34px) 0 calc(var(--tabbar-h) + var(--safe-b) + 16px) var(--gutter); }
.hero__copy { padding-right: var(--gutter); }
.hero h1 { font-size: clamp(32px, 9.4vw, 40px); }
.hero h1 br { display: none; }
.hero__lead { margin-top: 16px; font-size: 17px; }
.hero__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-top: 24px; }
.hero__actions .btn { padding: 0 10px; }
.hero__photo { margin: 34px -14px 0 0; transform: rotate(1.2deg); }
.hero__photo img { aspect-ratio: 16 / 10; }
.hero__grass { position: relative; z-index: 4; right: auto; display: block; width: 150%; margin: -5vw 0 0 -30%; }
.pigs { position: relative; left: auto; bottom: auto; margin: calc(-40vw - 6px) 0 0 calc(var(--gutter) * -1); padding-right: 3vw; justify-content: flex-end; z-index: 5; }
.pig, .pig--ernie { transition-duration: 1.4s; }
.pig__name { top: auto; bottom: -22px; transition: opacity .3s ease, translate .25s ease; }
.pig.is-hop .pig__name { translate: -50% -4px; }
.pig { width: 34vw; }
.pig--ernie { width: 29vw; }

.goal { min-height: 0; padding: 84px var(--gutter) 46vw; }
.ground--goal { background-position: center bottom; }
.goal h2 { font-size: 26px; }
.goal__figure { margin-top: 10px; }
.goal__figure { font-size: 19.5vw; }
.goal__copy > p { margin: 34px auto 34px; }
.meter { max-width: none; margin-top: 92px; }
.meter__ends { margin-top: 18px; }
.meter__pig { width: 72px; margin-left: -42px; bottom: calc(100% - 5px); }
.meter__ends { gap: 6px; font-size: clamp(12px, 3.8vw, 16px); }
.meter__ends span:nth-child(2) { font-size: clamp(16px, 5.4vw, 21px); }
.goal .btn { width: 100%; }
.note { display: none; }

.rail { --peek: clamp(40px, 14vw, 56px); height: auto; }
.rail::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url(../art/bg-meadow.webp) center bottom / auto 44% no-repeat; -webkit-mask-image: linear-gradient(#000 93%, #0000); mask-image: linear-gradient(#000 93%, #0000); }
.ground--meadow { display: none; }
.rail__stage { position: relative; height: auto; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
.rail__stage::-webkit-scrollbar { display: none; }
.rail__track { width: max-content; height: auto; padding-inline: calc(var(--peek) / 2); transform: none !important; will-change: auto; }
.stop, .stop--1, .stop--2, .stop--3, .stop--4 {
  flex: 0 0 calc(100vw - var(--peek)); min-width: 0; scroll-snap-align: center; scroll-snap-stop: always;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 22px;
  min-height: 0; padding: 96px 12px 150px;
}
.rail__title { font-size: 38px; margin: 0 0 4px; order: -2; }
.stop .stop__photo, .stop .stop__peek { order: -1; max-width: none; }
.stop--1 .stop__copy { display: contents; }
.stop--2 .stop__copy, .stop--4 .stop__copy { justify-self: auto; align-self: auto; margin: 0; }
.stop--3 { padding-top: 54vw; }
.stop--4 { padding-top: 50vw; }
.stop__hens { left: 8vw; bottom: 12px; }
.stop__hens .hen { width: 20vw; }
.stop__hens .hen--b { width: 17vw; }
.stop--2 { position: relative; }
.stop--4 .stop__photo { width: 78%; margin: 0 auto; }
.stop__copy { max-width: none; }
.stop h3 { font-size: 30px; }
.rail__count { display: none; }
.rail__nav { position: absolute; left: 0; right: 0; top: calc(96px + 80vw); z-index: 6; display: flex; justify-content: space-between; height: 0; padding: 0 4px; pointer-events: none; }
.rail__arrow { flex: none; display: grid; place-items: center; width: 44px; height: 44px; margin-top: -22px; padding: 0; border: 2px solid rgb(30 53 80 / .3); border-radius: 3px; background: rgb(242 178 27 / .35); pointer-events: auto; transition: translate .3s ease; }
.rail__arrow:active { transform: scale(.94); background: rgb(242 178 27 / .6); }
.rail__arrow img { width: 30px; height: auto; }
.rail__arrow[hidden] { display: grid; visibility: hidden; }
.rail__arrow.is-nudge { translate: 6px 0; }
.donkey { width: 38vw; left: 54%; transition: transform .4s ease-out; }

.visit { display: block; min-height: 0; padding: 44px var(--gutter) 30px; text-align: center; }
.visit > .ground--map { display: none; }
.visit__copy > p, .facts { max-width: none; width: 100%; }
.pins { position: relative; display: block; width: 100vw; max-width: 100vw; height: 177.78vw; align-self: flex-start; margin: 6px calc(var(--gutter) * -1) 0; text-align: left; }
.pins::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url(../art/bg-map-phone.webp) center / 100% 100% no-repeat; -webkit-mask-image: linear-gradient(#0000, #000 13%, #000 95%, #0000); mask-image: linear-gradient(#0000, #000 13%, #000 95%, #0000); }
.visit h2 { font-size: 42px; line-height: 1.08; }
.facts { grid-template-columns: 1fr; gap: 14px; margin: 22px 0 6px; }
.facts li { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 8px; }
.facts strong { display: inline; font-size: clamp(17px, 5.6vw, 21px); }
.sign .btn { min-height: 44px; margin-top: 2px; padding: 0 14px; font-size: 14px; }
.sign span { display: none; }
.stop__tour { width: 100%; }
.pins .pin { position: absolute; left: auto; right: auto; top: auto; bottom: auto; width: 46vw; opacity: 0; transform: translateY(-16px) rotate(calc(var(--tilt, 0deg) + 2deg)); transition: opacity .3s ease, transform .3s ease; transition-delay: 0s; }
.pins .pin.is-in { opacity: 1; transform: rotate(var(--tilt, 0deg)); }
.pins .pin--barn { left: 6%; top: 9%; }
.pins .pin--pond { right: 6%; top: 39%; }
.pins .pin--paddock { left: 8%; top: 69%; }
.visit__copy { display: contents; }
.visit__copy > .visit__how { max-width: none; width: 100%; margin: 10px 0 0; }
.visit__call { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); z-index: 5; order: 9; width: 100%; margin-top: 12px; }
.visit { display: flex; flex-direction: column; align-items: center; }
.visit h2 { width: 100%; }
.pins .pin img { height: auto; }
.visit__copy > p { margin-top: 18px; }

.promise { display: block; padding: 0 var(--gutter); }
.promise > .ground { margin: 0 calc(var(--gutter) * -1) -100svh; height: 100svh; }
.promise__photos { position: sticky; top: calc(var(--topbar-h) + 14px); z-index: 2; display: block; height: auto; padding-top: 14px; }
.promise__frame { width: 100%; }
.promise__words { padding: 0 0 6vh; }
.promise { display: flex; flex-direction: column; }
.promise__photos { order: 1; align-self: stretch; }
.promise__words { order: 2; }
.promise > .ground { order: 0; }
.word { min-height: 52svh; align-content: end; padding-bottom: 6vh; }
.word h2 { font-size: 15vw; }
.word p { font-size: 18px; }

.help { aspect-ratio: 9 / 14; padding: 22% var(--gutter) 0; }
.help > .ground--barn { background-size: 100% auto; background-position: center bottom; }
.help__title { font-size: 38px; }
.sign { left: 7%; width: 86%; height: auto; aspect-ratio: 1000 / 395; gap: 2px; padding: 9% 6% 0; background: url(../art/sign-board.webp) center / 100% 100% no-repeat; transform-origin: 50% 4%; }
.sign strong { font-size: 23px; }
.sign--monthly { top: 35.6%; }
.sign--share { right: auto; top: 57%; }
.help.is-in .sign:not(.has-swung) { animation: sign-swing .9s ease-out both; }
.help.is-in .sign--share:not(.has-swung) { animation-delay: .15s; }
.sign.is-nudge { animation: sign-nudge .45s ease-out; }
@keyframes sign-swing { 0% { transform: rotate(3deg); } 28% { transform: rotate(-2.2deg); } 52% { transform: rotate(1.4deg); } 76% { transform: rotate(-.6deg); } 100% { transform: rotate(0); } }
@keyframes sign-nudge { 35% { transform: rotate(1.5deg); } 70% { transform: rotate(-.6deg); } }

.news { min-height: 92svh; padding: 0 var(--gutter) 14vh; justify-items: stretch; }
.news h2 { font-size: 40px; }
.news__row { flex-direction: column; }
.news input { min-height: 52px; font-size: 17px; }
.ducks { bottom: 60%; }
.duck { width: 26vw; left: -30vw; opacity: 1; animation-duration: 30s, 1s; }
.duck--b { width: 21vw; bottom: -9vh; animation-duration: 38s, 1.2s; }
@keyframes duck-cross { to { transform: translateX(140vw); opacity: 1; } }

.volunteer { display: block; min-height: 0; overflow-x: clip; }
.volunteer__photo img { aspect-ratio: 4 / 3; }
.volunteer__wall { padding: 44px var(--gutter) 22vw; }
.volunteer h2 { font-size: 42px; }
.chalk { gap: 18px 30px; font-size: 21px; }
.chalk b { font-size: 50px; }
.volunteer__wall .btn { width: 100%; }
.hen { width: 24vw; }
.hen--b { width: 20vw; }
.hens { right: 6%; top: 0; bottom: auto; z-index: 2; transform: translateY(calc(-100% + 7px)); pointer-events: auto; }
.hens .hen, .hens .hen--b { transform: scaleX(-1); translate: 0 0; transition: translate 1.2s linear; }
.hens .hen.is-away { translate: 60vw 0; transition: none; }
.hens .hen.is-walking { transform: none; background-image: url(../art/henwalk.webp); background-size: 200% 100%; animation: hen-walk .36s steps(1) infinite !important; }
.hen.is-tilt { animation: none !important; background-position-x: 66.667%; }
.hen--roost.is-stand { background-position-x: 0; }
.foot__roost { pointer-events: auto; }
@keyframes hen-walk { 0% { background-position-x: 0; } 50% { background-position-x: 100%; } }

.foot { padding: 46vw var(--gutter) calc(var(--tabbar-h) + var(--safe-b) + 26px); }
.foot__inner { grid-template-columns: 1fr; gap: 26px; }
.foot__logo { width: 104px; }
.foot__links { grid-template-columns: 1fr 1fr; gap: 0 20px; }
.foot__links a { display: flex; align-items: center; min-height: 44px; }
.foot__col a, .foot__copyaddr { display: inline-flex; align-items: center; min-height: 44px; }
.foot__inner > .btn { width: 100%; }
.foot__roost { left: 10%; top: calc(16% - 24vw + 10px); }
.ground--evening { background-position: 80% top; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: 1fr 1fr 1.3fr 1fr 1fr;
  background: rgb(252 233 200 / .84);
  -webkit-backdrop-filter: blur(3px) saturate(1.4); backdrop-filter: blur(3px) saturate(1.4);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .85), 0 -1px 0 rgb(30 53 80 / .16);
  transition: transform .25s ease;
}
.tabbar a, .tabbar button {
  display: grid; place-items: center; align-content: center; gap: 2px; min-height: 44px;
  border: 0; background: none; color: var(--ink); text-decoration: none;
  font: 600 clamp(9px, 2.9vw, 11px)/1 var(--body); white-space: nowrap; min-width: 0;
}
.tabbar a:active, .tabbar button:active { transform: scale(.94); }
.tabbar a[aria-current="page"] { font-weight: 800; box-shadow: inset 0 3px 0 var(--blue); }
.tabbar__main { margin: 7px 2px; border: 2px solid var(--ink) !important; border-radius: 3px; background: var(--gold) !important; box-shadow: 2px 2px 0 var(--ink); font-weight: 800 !important; }
.ico { display: block; width: 30px; height: 30px; background: url(../art/icons.webp) 0 0 / 500% 100% no-repeat; }
.ico--animals { background-position-x: 25%; }
.ico--visit { background-position-x: 50%; }
.ico--donate { background-position-x: 75%; width: 24px; height: 24px; }
.ico--more { background-position-x: 100%; }

.sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none;
  height: 92svh; max-height: 92svh; padding: 0 0 var(--safe-b); border: 0;
  border-radius: 14px 14px 0 0;
  background: var(--paper) url(../art/bg-straw.webp) center / cover; color: var(--ink);
  display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform .25s ease;
}
.sheet:not([open]) { display: none; }
.sheet.is-open { transform: none; }
.sheet::backdrop { background: rgb(30 53 80 / .45); }
.sheet__grab { flex: none; width: 44px; height: 5px; border-radius: 3px; margin: 10px auto 2px; background: rgb(30 53 80 / .35); padding: 0; box-sizing: content-box; border: 12px solid transparent; background-clip: padding-box; }
.sheet header { flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 12px 8px 20px; }
.sheet header h2 { font-size: 24px; }
.sheet header button { width: 44px; height: 44px; border: 0; background: none; font-size: 30px; line-height: 1; color: var(--ink); }
.sheet__body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 0 20px; }
.sheet__body a, .sheet__body button {
  display: flex; align-items: center; gap: 6px; width: 100%; min-height: 52px; padding: 0;
  border: 0; border-bottom: 1px solid rgb(30 53 80 / .16); background: none;
  font: 600 19px/1.2 var(--body); color: var(--ink); text-decoration: none; text-align: left;
}
.sheet__body a:active, .sheet__body button:active { background: rgb(242 178 27 / .25); }
.sheet__actions { flex: none; padding: 12px 20px 14px; }
.sheet__actions .btn { width: 100%; }

.toast { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); white-space: nowrap; }

.stop__peek { position: relative; }
.stop--2 .stop__peek { margin-bottom: 30vw; }
.ponies { left: 0; right: 0; top: calc(100% - 18vw); justify-content: center; opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease; }
.stop.is-here .ponies { opacity: 1; transform: none; }
.pony--rear { width: 23vw; }
.pony--graze { width: 28vw; }
.pals { position: absolute; right: 3%; bottom: -12px; z-index: 2; display: flex; align-items: flex-end; }
.pal { width: 25vw; aspect-ratio: 4 / 3; padding: 0; border: 0; background: url(../art/pig.webp) 66.667% 0 / 700% 100% no-repeat; opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease; }
.pal--b { width: 21vw; margin-left: -3vw; transition-delay: .12s; }
.stop.is-here .pal { opacity: 1; transform: none; }
.pal.is-sniff { background-position-x: 83.333%; }
.pal.is-hop { background-position-x: 100%; animation: pig-hop .5s ease; }
.calf { position: absolute; left: 12%; bottom: 100%; z-index: -1; display: block; width: 40vw; aspect-ratio: 1; padding: 0; border: 0; background: url(../art/calf.webp) 0 0 / 400% 100% no-repeat; transform: translateY(100%); transition: transform .4s ease-out; }
.stop.is-here .calf { transform: translateY(14%); }
.calf.is-ear { background-position-x: 33.333%; }
.calf.is-blink { background-position-x: 66.667%; }
.calf.is-grin { background-position-x: 100%; }
.stop__hens { opacity: 0; transform: translateY(12px); transition: opacity .3s ease, transform .3s ease; }
.stop.is-here .stop__hens { opacity: 1; transform: none; }


@media (prefers-reduced-motion: reduce) {
  .sheet, .tabbar { transition: none; }
  .pal, .stop__hens, .ponies { opacity: 1; transform: none; transition: none; }
  .pins .pin { opacity: 1; transform: rotate(var(--tilt, 0deg)); transition: none; }
  .calf { transform: translateY(14%); transition: none; }
  .help.is-in .sign:not(.has-swung), .sign.is-nudge { animation: none; }
  .hens .hen { transition: none; }
}
