/* Woolly Bank Farm demo (/farm/). Everything is scoped to .fm-page (or the .fm-info dialogs) with fm- classes. */
@font-face { font-family: "Fredoka"; src: url(/assets/fonts/fredoka-variable.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Mulish"; src: url(/assets/fonts/mulish-normal-300-800.woff2) format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url(/assets/fonts/space-mono-normal-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Space Mono"; src: url(/assets/fonts/space-mono-normal-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }

.fm-page, .fm-info {
  /* Own fonts */
  --f-display: "Fredoka", system-ui, sans-serif;
  --f-body: "Mulish", system-ui, sans-serif;
  --f-mono: "Space Mono", ui-monospace, monospace;
  --fm-ink: #2b2418; --fm-card: rgba(251, 247, 236, .94); --fm-cream: #fbf7ec; --fm-red: #a8322a; --fm-green: #4f7a2f; --fm-muted: #5d5341;
  font-family: var(--f-body); color: var(--fm-ink);
}
.fm-page { background: #f4eedf; }
.fm-page h1, .fm-page h2, .fm-info h2 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.01em; text-transform: none; color: var(--fm-ink); }

/* ---------- the 3D stage ---------- */
.fm-stage { position: relative; height: calc(100svh - 74px); min-height: 540px; max-height: 1100px; overflow: hidden; background: #cde7f2; isolation: isolate; }
.fm-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.fm-top { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; pointer-events: none; z-index: 2; }
.fm-brand { font: 600 1.25rem/1 var(--f-display); background: var(--fm-card); padding: .6rem .9rem; border-radius: 14px; pointer-events: auto; display: flex; align-items: center; gap: .45rem; }
.fm-brand em { font-style: normal; color: var(--fm-red); }
.fm-tag { font: 700 .62rem/1 var(--f-mono); letter-spacing: .08em; text-transform: uppercase; background: var(--fm-ink); color: #fff; padding: .3rem .45rem; border-radius: 6px; }
.fm-nav { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; pointer-events: auto; max-width: 680px; }
.fm-nav button, .fm-tools button { font: 700 .85rem/1 var(--f-body); border: 0; border-radius: 999px; padding: .62rem .9rem; background: var(--fm-card); color: var(--fm-ink); cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, .08); }
.fm-nav button:hover, .fm-tools button:hover { background: #fff; }
.fm-nav button[aria-current="true"] { background: var(--fm-ink); color: #fff; }
.fm-card { position: absolute; left: 16px; bottom: 16px; z-index: 2; width: min(360px, calc(100% - 32px)); background: var(--fm-card); backdrop-filter: blur(10px); border-radius: 18px; padding: 1.2rem 1.3rem 1.3rem; box-shadow: 0 12px 40px rgba(0, 0, 0, .14);
  transform: translateY(24px); opacity: 0; transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .3s; pointer-events: none; }
.fm-card.is-on { transform: none; opacity: 1; pointer-events: auto; }
.fm-card h2 { font-size: 1.55rem; line-height: 1.1; margin: 0 0 .4rem; }
.fm-card p { margin: 0 0 1rem; color: var(--fm-muted); }
.fm-card__btns { display: flex; gap: .5rem; flex-wrap: wrap; }
.fm-card__btns a, .fm-btn, .fm-info__cta { display: inline-block; background: var(--fm-red); color: #fff; font: 800 1rem/1 var(--f-body); text-decoration: none; padding: .75rem 1.15rem; border-radius: 999px; border: 0; cursor: pointer; }
.fm-card__photo { font: 800 1rem/1 var(--f-body); border: 0; background: transparent; color: var(--fm-ink); box-shadow: inset 0 0 0 2px currentColor; padding: .72rem 1.1rem; border-radius: 999px; cursor: pointer; }
.fm-help { position: absolute; right: 16px; bottom: 16px; z-index: 2; text-align: right; font-size: .82rem; font-weight: 700; color: rgba(43, 36, 24, .78); }
.fm-help p { margin: 0; }
.fm-help kbd { font: 700 .74rem var(--f-mono); background: var(--fm-card); border-radius: 6px; padding: .1rem .4rem; }
.fm-tools { display: flex; gap: .35rem; justify-content: flex-end; flex-wrap: wrap; margin-bottom: .6rem; }
.fm-load { position: absolute; left: 50%; top: 50%; width: 240px; margin: -20px 0 0 -120px; text-align: center; font: 600 1.05rem var(--f-display); transition: opacity .5s; z-index: 2; }
.fm-load span { display: block; height: 4px; margin-top: .6rem; background: rgba(0, 0, 0, .1); border-radius: 4px; overflow: hidden; }
.fm-load i { display: block; height: 100%; background: var(--fm-green); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.fm-ready .fm-load { opacity: 0; pointer-events: none; }
.fm-skip { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1; font: 700 .82rem var(--f-body); color: var(--fm-ink); background: var(--fm-card); padding: .5rem .85rem; border-radius: 999px; text-decoration: none; }
/* No WebGL: no stage, the plan below does the job */
.fm-nogl .fm-stage { display: none; }

/* ---------- plan your day (always present: the no-3D version and the readable content) ---------- */
.fm-plan { padding: clamp(48px, 7vw, 96px) 0 clamp(40px, 6vw, 80px); }
.fm-wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.fm-kicker { font: 700 .78rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fm-red); margin: 0 0 .6rem; }
.fm-plan h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); line-height: 1.02; margin: 0 0 .8rem; }
.fm-lede { font-size: 1.15rem; color: var(--fm-muted); max-width: 40rem; margin: 0 0 2.4rem; }
.fm-stops { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
.fm-stops > li { background: var(--fm-cream); border-radius: 20px; overflow: hidden; box-shadow: 0 18px 40px -30px rgba(0, 0, 0, .4); scroll-margin-top: 90px; }
.fm-stops img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.fm-stops > li > div { padding: 1.1rem 1.2rem 1.3rem; }
.fm-stops__k { font: 700 .72rem var(--f-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fm-red); margin: 0 0 .3rem; }
.fm-stops h2 { font-size: 1.45rem; margin: 0 0 .4rem; }
.fm-stops p { margin: 0 0 .6rem; color: var(--fm-muted); }
.fm-stops ul { margin: 0; padding-left: 1.1rem; color: var(--fm-muted); font-size: .95rem; }
.fm-contact { margin-top: clamp(28px, 4vw, 48px); display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; background: var(--fm-ink); color: #fff; border-radius: 22px; padding: clamp(20px, 3vw, 32px); scroll-margin-top: 90px; }
.fm-contact h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 2rem); margin: 0 0 .3rem; }
.fm-contact p { margin: 0; color: rgba(255, 255, 255, .78); }
.fm-credits { margin: 2rem 0 0; font-size: .85rem; color: var(--fm-muted); max-width: 52rem; }
.fm-credits a { color: inherit; }

/* ---------- dialogs: photo + info, and the contact form ---------- */
.fm-info { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(30, 24, 14, .45); backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.fm-info.is-on { opacity: 1; visibility: visible; transition: opacity .3s; }
.fm-info__box { position: relative; width: min(560px, 100%); max-height: calc(100svh - 32px); overflow: auto; background: var(--fm-cream); border-radius: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
  transform: translateY(18px) scale(.97); transition: transform .4s cubic-bezier(.2, .8, .2, 1); }
.fm-info.is-on .fm-info__box { transform: none; }
.fm-info img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.fm-info__body { padding: 1.2rem 1.4rem 1.5rem; }
.fm-info__kicker { font: 700 .74rem var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fm-red); }
.fm-info h2 { font-size: 1.7rem; line-height: 1.1; margin: .3rem 0 .7rem; }
.fm-info ul { margin: 0 0 1.2rem; padding-left: 1.1rem; color: var(--fm-muted); }
.fm-info li { margin: .25rem 0; }
.fm-info__close { position: absolute; top: 10px; right: 10px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: rgba(251, 247, 236, .94); font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--fm-ink); z-index: 1; }
.fm-form form { display: grid; gap: .7rem; }
.fm-form label { display: grid; gap: .25rem; font-weight: 800; font-size: .88rem; }
.fm-form label span { font-weight: 600; color: #7a6e58; }
.fm-form input, .fm-form select, .fm-form textarea { font: 400 1rem/1.4 var(--f-body); padding: .65rem .75rem; border: 2px solid #e2d8c2; border-radius: 12px; background: #fff; color: var(--fm-ink); width: 100%; }
.fm-form input:focus, .fm-form select:focus, .fm-form textarea:focus { outline: none; border-color: var(--fm-red); }
.fm-form button[type=submit] { justify-self: start; }
.fm-form button[disabled] { opacity: .6; }
.fm-form__demo { margin: -.2rem 0 1rem; padding: .6rem .8rem; background: #f1e9d6; border-radius: 10px; font-size: .88rem; }
.fm-form__hp { position: absolute; left: -9999px; }
.fm-form__status { margin: .8rem 0 0; font-weight: 700; }
.fm-form__status.is-ok { color: #2f6b22; }
.fm-form__status.is-err { color: var(--fm-red); }

@media (max-width: 960px) { .fm-stops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .fm-stage { height: calc(100svh - 64px); min-height: 560px; }
  .fm-top { flex-direction: column; gap: .6rem; }
  .fm-nav { justify-content: flex-start; }
  .fm-nav button { padding: .55rem .75rem; font-size: .8rem; }
  .fm-help { left: 16px; }
  .fm-help .fm-keys { display: none; }
  .fm-card { bottom: 118px; }
  .fm-skip { display: none; }
  .fm-stops { grid-template-columns: 1fr; }
}
