/* Dragonfly Software Farm: pixel-art farm, framed in rustic materials
   (aged parchment, torn edges, wood signs, ink, a hand-drawn seal). */

:root {
    --sky: #8fcbe6;
    --grass: #5e9d3e;
    --grass-d: #4b8432;
    --charcoal: #39393b;
    --charcoal-2: #2e2e30;
    --parchment: #efe5cf;
    --parchment-2: #e4d6b6;
    --ink: #2b2722;
    --ink-soft: #5a5146;
    --moss: #4e6a3d;
    --moss-d: #3e5630;
    --heather: #6f5d82;
    --rust: #9c4f2c;
    --wheat: #e2c27a;
    --wood: #9a6538;
    --wood-d: #6f4524;
    --wood-l: #b98250;
    --serif: "IM Fell English", Georgia, serif;
    --sc: "IM Fell English SC", Georgia, serif;
    --sans: "Alegreya Sans", "Gill Sans", system-ui, sans-serif;
    --pixel: "Pixelify Sans", ui-monospace, monospace;
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.25 0 0 0 0 0.12 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --heathered: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .06 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --wood-grain: repeating-linear-gradient(180deg, transparent 0 5px, rgba(0, 0, 0, .08) 5px 6px, transparent 6px 11px, rgba(255, 255, 255, .05) 11px 12px);
    --hand: 255px 15px 225px 15px / 15px 225px 15px 255px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }
body { font: 400 1.15rem/1.55 var(--sans); color: var(--ink); background: var(--parchment); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
.pixel { image-rendering: pixelated; }
a { color: inherit; }
.wrap { width: min(1180px, 100% - 3rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 3rem); }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.1; }
h2 { font-size: clamp(2rem, 4.2vw, 3.1rem); margin-bottom: 2.4rem; }
h2 em, h1 em { font-style: italic; }
.center { text-align: center; }

/* ---------- Buttons: hand-cut wood ---------- */
.btn { display: inline-block; font: 700 1.05rem var(--sans); letter-spacing: .02em; text-decoration: none; color: var(--parchment);
    background: var(--grain), var(--moss); padding: .85rem 1.6rem; border: 2px solid var(--ink); border-radius: var(--hand);
    box-shadow: 3px 4px 0 var(--ink); transition: transform .12s ease, box-shadow .12s ease; }
.btn:hover { transform: translate(-1px, -2px); box-shadow: 4px 6px 0 var(--ink); }
.btn-plain { background: var(--parchment); color: var(--ink); }

/* ---------- Nav: a wooden plank ---------- */
.nav { position: sticky; top: 0; z-index: 20; background: var(--wood-grain), var(--grain), var(--wood); border-bottom: 3px solid var(--wood-d); box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: #fbf3df; font: 1.3rem var(--sc); text-shadow: 1px 1px 0 var(--wood-d); }
.brand img { filter: drop-shadow(1px 1px 0 var(--wood-d)); }
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a { color: #fbf3df; text-decoration: none; font-weight: 500; }
.nav-links a:hover { text-decoration: underline wavy; }
.btn-small { padding: .35rem .9rem; font-size: .95rem; box-shadow: 2px 3px 0 var(--ink); }

/* ---------- Hero: sky + the farm ---------- */
.hero { background: linear-gradient(180deg, #7fc0df 0, var(--sky) 260px); padding-top: 3.8rem; }
.hero-copy { text-align: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); color: var(--ink); margin-bottom: .8rem; text-shadow: 0 2px 0 rgba(255, 255, 255, .35); }
.hero h1 em { color: #24502f; }
.lede { font-size: 1.35rem; color: #20323a; max-width: 620px; margin: 0 auto 1.8rem; }
.hero-ctas { display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; }
.scene { position: relative; max-width: 1536px; margin: 1.2rem auto 0; }
.scene-inner { position: relative; }
.scene img { width: 100%; }
.pin { position: absolute; transform: translate(-50%, -100%); font: 1.15rem var(--serif); color: #fbf3df; background: var(--wood);
    border: 2px solid var(--wood-d); width: 1.9rem; height: 1.9rem; display: grid; place-items: center; box-shadow: 2px 2px 0 rgba(0, 0, 0, .3);
    animation: bob 2.6s ease-in-out infinite; }
.pin::after { content: ""; position: absolute; top: 100%; left: 50%; width: 3px; height: 10px; margin-left: -1.5px; background: var(--wood-d); }
.pin:nth-of-type(2n) { animation-delay: .4s; }
.pin:nth-of-type(3n) { animation-delay: .9s; }
@keyframes bob { 0%, 100% { transform: translate(-50%, -100%); } 50% { transform: translate(-50%, -115%); } }
@media (prefers-reduced-motion: reduce) { .pin { animation: none; } }

/* ---------- Signposts on the grass ---------- */
.signposts { background: var(--grain), var(--grass); padding: 1.6rem 0 4.5rem; position: relative; }
.posts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.post { position: relative; background: var(--wood-grain), var(--grain), var(--wood-l); color: #2a1a0e; border: 3px solid var(--wood-d);
    border-radius: 4px; padding: 1.4rem .9rem .9rem; box-shadow: 3px 4px 0 rgba(0, 0, 0, .25); }
.post b { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font: 1.15rem var(--serif); background: var(--wood-d); color: #fbf3df; width: 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 50%; }
.post h3 { font: 700 1.2rem var(--pixel); text-align: center; margin-bottom: .3rem; }
.post p { font-size: 1rem; line-height: 1.35; text-align: center; }
.helpers { display: flex; align-items: center; justify-content: center; gap: .6rem; margin-top: 2rem; color: #f2f7e6; font-size: 1.05rem; }
.helpers img { width: 40px; }

/* ---------- Paper sections with torn tops ---------- */
.section { position: relative; padding: 5.5rem 0; }
.section::before { content: ""; position: absolute; left: 0; right: 0; top: -22px; height: 24px; background-size: 1200px 24px; background-repeat: repeat-x; }
.parchment { background: radial-gradient(ellipse at 15% 20%, rgba(156, 79, 44, .07), transparent 45%), radial-gradient(ellipse at 85% 80%, rgba(111, 93, 130, .07), transparent 50%), var(--grain), var(--parchment); }
.parchment::before { background-image: url("/img/edge-parchment.svg"); }
.parchment-2 { background: radial-gradient(ellipse at 80% 10%, rgba(78, 106, 61, .08), transparent 45%), var(--grain), var(--parchment-2); }
.parchment-2::before { background-image: url("/img/edge-parchment-2.svg"); }
.charcoal { color: var(--parchment); background: var(--heathered), var(--charcoal); }
.charcoal::before { background-image: url("/img/edge-charcoal.svg"); }

/* ---------- Tiles (problem + market) ---------- */
.tiles { display: grid; gap: 1.2rem; }
.tiles.four { grid-template-columns: repeat(4, 1fr); }
.tiles.five { grid-template-columns: repeat(5, 1fr); }
.tile { position: relative; text-align: center; padding: 1.4rem 1rem 1.2rem; }
.tile::before { content: ""; position: absolute; inset: 0; border: 2px solid var(--ink); border-radius: var(--hand); background: rgba(255, 252, 242, .55); filter: url(#rough); z-index: 0; }
.tile > * { position: relative; z-index: 1; }
.tile img { width: 72px; margin: 0 auto .7rem; }
.tile h3 { font: 1.4rem var(--serif); margin-bottom: .1rem; }
.tile p { color: var(--ink-soft); font-size: 1.05rem; line-height: 1.35; }
.tag { display: inline-block; margin-top: .6rem; font: 500 .8rem var(--pixel); letter-spacing: .04em; padding: .1rem .55rem; border: 1.5px solid currentColor; border-radius: 3px; transform: rotate(-2deg); }
.tag.in { color: var(--moss); }
.tag.add { color: var(--rust); }
#problem h2 { text-align: center; }

/* ---------- The gate ---------- */
.gate { display: grid; grid-template-columns: 360px 1fr; gap: 4rem; align-items: center; }
.gate h2 { margin-bottom: 1.6rem; }
.gate h2 em { color: var(--wheat); }
.phone { width: 300px; margin: 0 auto; background: #1d1d1f; border-radius: 42px; padding: 14px; box-shadow: 0 0 0 2px #555, 12px 16px 0 rgba(0, 0, 0, .35); transform: rotate(-3deg); }
.phone-screen { background: linear-gradient(180deg, #7fc0df, #a9d8ec 45%, var(--grass) 45%, var(--grass-d)); border-radius: 30px; padding: 4.5rem 1rem 6rem; }
.phone-app, .phone-title, .phone-body, .phone-actions { background: rgba(250, 245, 232, .96); }
.phone-app { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--ink-soft); padding: .6rem .8rem .2rem; border-radius: 14px 14px 0 0; }
.phone-title { font: 700 1.1rem var(--sans); color: var(--ink); padding: 0 .8rem; }
.phone-body { font-size: .92rem; color: var(--ink-soft); padding: .2rem .8rem .7rem; line-height: 1.4; }
.phone-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; padding: 0 .8rem .8rem; border-radius: 0 0 14px 14px; }
.phone-actions span { text-align: center; font-weight: 700; padding: .45rem; border-radius: 10px; font-size: .95rem; }
.phone-actions .no { background: #e8e1d0; color: var(--ink-soft); }
.phone-actions .yes { background: var(--moss); color: #fff; }
.checks { list-style: none; }
.checks li { position: relative; padding: .55rem 0 .55rem 2.6rem; font-size: 1.3rem; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: .6rem; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; font: 700 1rem var(--pixel); color: var(--charcoal); background: var(--wheat); border-radius: 4px; transform: rotate(-4deg); }

/* ---------- Market board ---------- */
.board { display: flex; justify-content: center; margin-bottom: 1.2rem; }
.board span { font: 2rem var(--sc); color: #fbf3df; background: var(--wood-grain), var(--grain), var(--wood); border: 3px solid var(--wood-d); padding: .3rem 2.4rem; box-shadow: 3px 4px 0 rgba(0, 0, 0, .25); position: relative; }
.board span::before, .board span::after { content: ""; position: absolute; top: -40px; width: 3px; height: 40px; background: var(--wood-d); }
.board span::before { left: 18%; }
.board span::after { right: 18%; }
#market h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }

/* ---------- Fair trade stamps ---------- */
.stamps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; }
.stamp { display: inline-block; font: 1.7rem var(--sc); color: var(--rust); border: 3px double var(--rust); border-radius: 8px; padding: .2rem 1.2rem; transform: rotate(-4deg); margin-bottom: 1rem; filter: url(#rough); }
.stamp-card:nth-child(2) .stamp { color: var(--moss); border-color: var(--moss); transform: rotate(3deg); }
.stamp-card:nth-child(3) .stamp { color: var(--heather); border-color: var(--heather); transform: rotate(-2deg); }
.stamp-card p { color: var(--ink-soft); max-width: 300px; margin: 0 auto; }

/* ---------- FAQ ---------- */
details { border-bottom: 1.5px dashed rgba(43, 39, 34, .3); padding: 1rem 0; }
summary { cursor: pointer; font: 1.45rem var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--pixel); color: var(--moss); }
details[open] summary::after { content: "–"; }
details p { color: var(--ink-soft); margin-top: .5rem; }

/* ---------- Join + seal ---------- */
.join { display: grid; grid-template-columns: 340px 1fr; gap: 4rem; align-items: center; }
.seal { width: 100%; filter: drop-shadow(6px 8px 0 rgba(0, 0, 0, .3)); }
.seal-text { font: 26px var(--sc); fill: #efe5cf; letter-spacing: 2px; }
.join h2 { margin-bottom: 1rem; }
.join .lede { color: rgba(239, 229, 207, .85); margin: 0 0 1.8rem; }

.footer { background: var(--charcoal-2); color: rgba(239, 229, 207, .6); font-size: 1rem; padding: 1.5rem 0; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.footer a { color: var(--wheat); }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
    .posts { grid-template-columns: repeat(3, 1fr); row-gap: 1.8rem; }
    .tiles.five { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
    .nav-links a:not(.btn) { display: none; }
    .tiles.four { grid-template-columns: repeat(2, 1fr); }
    .gate, .join { grid-template-columns: 1fr; gap: 2.5rem; }
    .join { text-align: center; }
    .join .seal { max-width: 280px; margin: 0 auto; }
    .stamps { grid-template-columns: 1fr; }
    .pin { width: 1.4rem; height: 1.4rem; font-size: .8rem; }
    .scene { overflow-x: auto; }
}
@media (max-width: 560px) {
    .posts { grid-template-columns: repeat(2, 1fr); }
    .tiles.five { grid-template-columns: repeat(2, 1fr); }
    .brand span { font-size: 1rem; }
    .scene-inner { width: 170%; }
}

/* ---------- Behind the scenes ---------- */
.kicker { font: italic 1.2rem var(--serif); color: var(--rust); margin-bottom: .3rem; }
.kicker.light { color: var(--wheat); }
.intro { max-width: 640px; color: var(--ink-soft); font-size: 1.2rem; margin: -1.6rem 0 2.6rem; }
.charcoal .intro { color: rgba(239, 229, 207, .75); }
.farm-name { font: italic 1rem var(--serif) !important; color: var(--ink-soft); }

/* Cutaway diagram (engraving style) */
.cutaway-wrap { overflow-x: auto; }
.cutaway { width: 100%; min-width: 820px; display: block; filter: drop-shadow(0 10px 18px rgba(43, 39, 34, .18)); }
.cutaway .t-mono { font: 12px ui-monospace, Menlo, monospace; fill: #5a5146; }
.cutaway .t-serif { font: 22px "IM Fell English", serif; fill: #2b2722; }
.cutaway .t-small { font: italic 13px "IM Fell English", serif; fill: #5a5146; }
.cutaway .t-band text { font: 17px "IM Fell English SC", serif; fill: #2b2722; letter-spacing: 1px; }
.cutaway .nodes rect { fill: #fbf6ea; stroke: #2b2722; stroke-width: 1.3; }
.cutaway .nodes text { font: 15px "IM Fell English", serif; fill: #2b2722; text-anchor: middle; }
.cutaway .nodes text.sub { font: 12px "Alegreya Sans", sans-serif; fill: #5a5146; }

/* Launch timeline */
.launch { list-style: none; display: grid; grid-template-columns: repeat(8, 1fr); position: relative; counter-reset: s; }
.launch::before { content: ""; position: absolute; left: 4%; right: 4%; top: 44px; border-top: 2px solid var(--ink); }
.launch li { position: relative; text-align: center; padding-top: 70px; }
.launch li::before { content: ""; position: absolute; top: 36px; left: 50%; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--parchment); border: 2px solid var(--ink); }
.launch li.you::before { background: var(--wheat); width: 24px; height: 24px; margin-left: -12px; top: 33px; }
.launch .t { position: absolute; top: 4px; left: 0; right: 0; font: 600 .9rem ui-monospace, Menlo, monospace; color: var(--ink-soft); }
.launch li.you .t { font: italic 1rem var(--serif); color: var(--rust); }
.launch b { display: block; font: 1.15rem var(--serif); }
.launch i { display: block; font-style: normal; font-size: .95rem; color: var(--ink-soft); line-height: 1.3; }
.outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin: 2.4rem 0 0 auto; max-width: 70%; }
.outcome { padding: 1rem 1.2rem; border: 1.5px solid var(--ink); border-radius: 6px; font-size: 1.05rem; color: var(--ink-soft); background: rgba(255, 252, 242, .6); }
.outcome b { display: block; font: 1.2rem var(--serif); color: var(--ink); }
.outcome.ok { border-left: 6px solid var(--moss); }
.outcome.back { border-left: 6px solid var(--rust); }

/* Almanac dashboard */
.dash { background: #1f2021; border: 1px solid rgba(239, 229, 207, .12); border-radius: 12px; box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .7); overflow: hidden; }
.dash-top { display: flex; justify-content: space-between; padding: .7rem 1.2rem; font: .85rem ui-monospace, Menlo, monospace; color: rgba(239, 229, 207, .55); border-bottom: 1px solid rgba(239, 229, 207, .08); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr 340px; grid-template-rows: auto auto; gap: 1px; background: rgba(239, 229, 207, .06); }
.panel { background: #1f2021; padding: 1rem 1.2rem 1.2rem; position: relative; }
.panel.wide { grid-column: 1 / 3; }
.panel.feed { grid-column: 3; grid-row: 1 / 3; }
.panel-h { font-size: .9rem; color: rgba(239, 229, 207, .6); margin-bottom: .6rem; display: flex; justify-content: space-between; }
.panel-h em { font-style: normal; font: 600 .95rem ui-monospace, Menlo, monospace; color: var(--parchment); }
.panel svg { width: 100%; height: 120px; display: block; }
.panel.wide svg { height: 150px; }
.panel .mark { stroke: rgba(239, 229, 207, .45); stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.panel .mark.back { stroke: #e07a5a; }
.panel .limit { stroke: rgba(224, 122, 90, .4); stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; }
.marks { position: relative; height: 1.2rem; font: .75rem ui-monospace, Menlo, monospace; color: rgba(239, 229, 207, .6); }
.marks span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.marks span:first-child { transform: translateX(-100%); padding-right: .4rem; }
.marks span.back { color: #e07a5a; transform: none; padding-left: .4rem; }
.feed ul { list-style: none; font-size: .95rem; }
.feed li { padding: .55rem 0; border-bottom: 1px solid rgba(239, 229, 207, .07); color: rgba(239, 229, 207, .82); line-height: 1.35; }
.feed time { display: inline-block; width: 3.2rem; font: .82rem ui-monospace, Menlo, monospace; color: rgba(239, 229, 207, .45); }
.feed li.bad { color: #e07a5a; }
.feed li.back { color: var(--wheat); }

@media (max-width: 1000px) {
    .launch { grid-template-columns: repeat(4, 1fr); row-gap: 1.5rem; }
    .launch::before { display: none; }
    .outcomes { max-width: none; grid-template-columns: 1fr; }
    .dash-grid { grid-template-columns: 1fr; }
    .panel.wide, .panel.feed { grid-column: auto; grid-row: auto; }
}
@media (max-width: 560px) {
    .launch { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Clickable stations ---------- */
.spot { position: absolute; background: none; border: 2px dashed transparent; border-radius: 10px; cursor: pointer; z-index: 2; transition: border-color .15s, background .15s; }
.spot:hover, .spot:focus-visible, .spot.active { border-color: rgba(251, 243, 223, .9); background: rgba(255, 255, 255, .12); outline: none; }
.pin { z-index: 3; pointer-events: none; transition: background .15s; }
.pin.hover, .pin.active { background: var(--moss); border-color: var(--moss-d); }
.scene-hint { text-align: center; font: italic 1.05rem var(--serif); color: #f2f7e6; background: var(--grass); padding: .4rem 0 0; }
.scene-hint::before { content: "☞ "; font-style: normal; }

/* Walking helpers: 2-frame sprite sheets, patrolling the path between stations */
.walkers { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.bot { position: absolute; top: 71.0%; width: calc(11 / 384 * 100%); aspect-ratio: 11 / 10; background-size: 200% 100%; image-rendering: pixelated;
    animation: step .45s steps(1) infinite, patrol var(--dur) linear infinite var(--delay, 0s); }
.b-seeds { background-image: url("/img/bot-seeds.png"); --a: 9%; --b: 25%; --dur: 13s; }
.b-can { background-image: url("/img/bot-can.png"); --a: 31%; --b: 43%; --dur: 10s; --delay: -4s; top: 70.3%; }
.b-crate { background-image: url("/img/bot-crate.png"); --a: 55%; --b: 76%; --dur: 15s; --delay: -2s; top: 71.7%; }
.b-box { background-image: url("/img/bot-box.png"); --a: 79%; --b: 86%; --dur: 8s; --delay: -6s; top: 71.3%; }
.b-plain { background-image: url("/img/bot-plain.png"); --a: 2%; --b: 95%; --dur: 46s; --delay: -20s; top: 73.7%; }
@keyframes step { 0% { background-position: 0 0; } 50% { background-position: 100% 0; } }
@keyframes patrol {
    0% { left: var(--a); transform: scaleX(1); }
    8% { left: var(--a); transform: scaleX(1); }
    46% { left: var(--b); transform: scaleX(1); }
    50% { left: var(--b); transform: scaleX(-1); }
    54% { left: var(--b); transform: scaleX(-1); }
    96% { left: var(--a); transform: scaleX(-1); }
    100% { left: var(--a); transform: scaleX(1); }
}
@media (prefers-reduced-motion: reduce) { .bot { animation: none; left: var(--a); } }

/* Signposts are buttons now */
button.post { font: inherit; cursor: pointer; text-align: center; transition: transform .12s ease, box-shadow .12s ease; }
button.post:hover { transform: translateY(-3px); box-shadow: 3px 7px 0 rgba(0, 0, 0, .25); }
button.post.active { background: var(--wood-grain), var(--grain), var(--wheat); transform: translateY(-4px); }
button.post.active b { background: var(--moss); }

/* Station details: a parchment card pinned under the signposts */
.details { margin-top: 1.6rem; }
.detail { position: relative; display: grid; grid-template-columns: 280px 1fr 260px; gap: 2rem; align-items: start; padding: 1.6rem;
    background: var(--grain), var(--parchment); border: 3px solid var(--wood-d); border-radius: 6px; box-shadow: 4px 6px 0 rgba(0, 0, 0, .25);
    animation: unfold .25s ease-out; }
.detail[hidden] { display: none; }
@keyframes unfold { from { opacity: 0; transform: translateY(-8px); } }
.crop { width: 100%; background-image: url("/img/farm-panorama.png"); background-repeat: no-repeat; image-rendering: pixelated; border: 2px solid var(--ink); border-radius: 4px; }
.detail-n { font: 600 .85rem ui-monospace, Menlo, monospace; color: var(--rust); letter-spacing: .04em; text-transform: uppercase; }
.detail h3 { font: 1.9rem var(--serif); margin: .2rem 0 .5rem; }
.detail-body > p:not(.detail-n) { color: var(--ink-soft); margin-bottom: .8rem; }
.detail ul { list-style: none; }
.detail li { position: relative; padding: .25rem 0 .25rem 1.5rem; font-size: 1.05rem; }
.detail li::before { content: ""; position: absolute; left: .2rem; top: .8rem; width: 8px; height: 8px; background: var(--moss); transform: rotate(45deg); }
.detail-sec { background: var(--charcoal); color: var(--parchment); padding: 1.1rem 1.2rem; border-radius: 6px; font-size: 1rem; line-height: 1.4; }
.detail-sec svg { width: 26px; height: 26px; fill: none; stroke: var(--wheat); stroke-width: 1.8; margin-bottom: .4rem; }
.detail-sec b { display: block; font: 1.15rem var(--serif); color: var(--wheat); margin-bottom: .2rem; }
.detail-sec a { display: inline-block; margin-top: .8rem; color: var(--wheat); font-weight: 700; text-decoration: none; }
.detail-sec a:hover { text-decoration: underline; }
.detail-close { position: absolute; top: .3rem; right: .6rem; background: none; border: 0; font: 1.8rem var(--serif); color: var(--ink-soft); cursor: pointer; }

/* ---------- Security rings ---------- */
.security { display: grid; grid-template-columns: minmax(0, 480px) 1fr; gap: 3.5rem; align-items: center; }
.rings { width: 100%; filter: drop-shadow(0 10px 18px rgba(43, 39, 34, .18)); }
.rings .r-lab { font: 17px "IM Fell English SC", serif; fill: #2b2722; letter-spacing: 1.5px; }
.rings .r-small { font: italic 11.5px "IM Fell English", serif; fill: #5a5146; }
.rings .r-core { font: 24px "IM Fell English", serif; fill: #2b2722; }
.rings .r-core-s { font: italic 13px "IM Fell English", serif; fill: #5a5146; }
.locks { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem; }
.locks li { position: relative; padding-left: 2.6rem; color: var(--ink-soft); font-size: 1.05rem; line-height: 1.4; }
.locks li::before { content: ""; position: absolute; left: 0; top: .1rem; width: 1.8rem; height: 1.8rem; border-radius: 4px; transform: rotate(-4deg);
    background: var(--charcoal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e2c27a' stroke-width='2'%3E%3Crect x='6' y='11' width='12' height='9' rx='1'/%3E%3Cpath d='M9 11V8.5a3 3 0 0 1 6 0V11'/%3E%3C/svg%3E") center / 70% no-repeat; }
.locks b { display: block; font: 1.3rem var(--serif); color: var(--ink); font-weight: 400; margin-bottom: .15rem; }
.locks small { display: block; margin-top: .3rem; font: .8rem ui-monospace, Menlo, monospace; color: var(--rust); }

@media (max-width: 1000px) {
    .detail { grid-template-columns: 200px 1fr; }
    .detail-sec { grid-column: 1 / -1; }
    .security { grid-template-columns: 1fr; }
    .rings { max-width: 480px; margin: 0 auto; }
}
@media (max-width: 640px) {
    .detail { grid-template-columns: 1fr; }
    .crop { max-width: 260px; }
    .locks { grid-template-columns: 1fr; }
}
button.post { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }

/* ---------- Fly-by ---------- */
.fb-view { position: relative; border-radius: 10px; overflow: hidden; border: 3px solid #1d1d1f; box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .7); background: var(--grass-d); }
.fb-view canvas { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; image-rendering: pixelated; }
.fb-card { position: absolute; left: 1.2rem; bottom: 1.2rem; max-width: 360px; padding: .9rem 1.1rem 1rem; background: rgba(31, 32, 33, .86); backdrop-filter: blur(4px);
    border: 1px solid rgba(239, 229, 207, .15); border-radius: 8px; color: var(--parchment); }
.fb-card.in { animation: unfold .45s ease-out; }
.fb-n { font: .78rem ui-monospace, Menlo, monospace; color: var(--wheat); letter-spacing: .06em; }
.fb-card h3 { font: 1.5rem var(--serif); margin: .1rem 0 .25rem; }
.fb-card p:last-child { font-size: 1rem; color: rgba(239, 229, 207, .8); line-height: 1.4; }
.fb-play { position: absolute; top: 1rem; right: 1rem; font: 600 .85rem var(--sans); color: var(--parchment); background: rgba(31, 32, 33, .75); border: 1px solid rgba(239, 229, 207, .25); border-radius: 999px; padding: .35rem .9rem; cursor: pointer; }
.fb-stops { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.2rem; counter-reset: stop; }
.fb-stops button { counter-increment: stop; font: 500 .95rem var(--sans); color: rgba(239, 229, 207, .75); background: none; border: 1px solid rgba(239, 229, 207, .2); border-radius: 999px; padding: .35rem .9rem; cursor: pointer; }
.fb-stops button::before { content: counter(stop) "  "; font: .8rem ui-monospace, Menlo, monospace; color: var(--wheat); white-space: pre; }
.fb-stops button:hover { border-color: rgba(239, 229, 207, .5); }
.fb-stops button.active { background: var(--parchment); color: var(--ink); border-color: var(--parchment); }

/* ---------- Cut scenes ---------- */
.film { display: grid; grid-template-columns: 260px 1fr; grid-template-rows: auto auto; gap: 1rem 1.6rem; }
.film-tabs { grid-row: 1 / 3; display: flex; flex-direction: column; gap: .6rem; }
.film-tabs button { text-align: left; font: inherit; color: var(--parchment); background: rgba(239, 229, 207, .04); border: 1px solid rgba(239, 229, 207, .15); border-radius: 8px; padding: .8rem 1rem; cursor: pointer; }
.film-tabs b { display: block; font: 1.35rem var(--serif); }
.film-tabs i { font-style: normal; font-size: .95rem; color: rgba(239, 229, 207, .6); }
.film-tabs button.active { background: var(--parchment); color: var(--ink); border-color: var(--parchment); }
.film-tabs button.active i { color: var(--ink-soft); }
.film-frame { position: relative; border: 3px solid #1d1d1f; border-radius: 8px; overflow: hidden; box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .7); }
.film-frame canvas { display: block; width: 100%; aspect-ratio: 2 / 1; image-rendering: pixelated; }
.film-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(0, 0, 0, .3); }
.film-bar i { display: block; height: 100%; width: 0; background: var(--wheat); }
.film-replay { position: absolute; top: .6rem; right: .6rem; width: 2rem; height: 2rem; border-radius: 50%; border: 0; background: rgba(31, 32, 33, .6); color: #fff; font-size: 1.1rem; cursor: pointer; }
.dialog { position: relative; background: var(--wood-grain), var(--grain), var(--parchment); color: var(--ink); border: 3px solid var(--wood-d); border-radius: 6px; padding: .9rem 1.2rem 1rem; min-height: 5.4rem; box-shadow: 3px 4px 0 rgba(0, 0, 0, .35); }
.dialog-who { position: absolute; top: -.9rem; left: 1rem; font: 600 .85rem var(--pixel); background: var(--wood); color: #fbf3df; border: 2px solid var(--wood-d); padding: 0 .6rem; }
.dialog-text { font: 1.35rem/1.35 var(--serif); }
@media (max-width: 900px) {
    .film { grid-template-columns: 1fr; }
    .film-tabs { grid-row: auto; flex-direction: row; overflow-x: auto; }
    .film-tabs button { flex: 1 0 150px; }
    .fb-card { position: static; max-width: none; border-radius: 0; }
}

/* View switch: The Farm | Technical details */
.views { display: flex; padding: 3px; border-radius: 999px; background: rgba(43, 26, 14, .35); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .35); }
.views a { padding: .22rem .85rem; border-radius: 999px; text-decoration: none; font: 500 .92rem var(--sans); color: #f3e7cf; }
.views a[aria-current] { background: #fbf3df; color: var(--ink); }
.views a:not([aria-current]):hover { background: rgba(255, 255, 255, .1); }
@media (max-width: 1180px) { .nav-links a[href="#how"], .nav-links a[href="#market"] { display: none; } }
@media (max-width: 640px) { .brand span { display: none; } }

/* ---------- The sheds: night sky ---------- */
.night { color: var(--parchment); background: radial-gradient(ellipse at 50% 120%, #3a2f5e 0, transparent 60%), #0e1430; }
.night::before { background-image: url("/img/edge-night.svg"); }
.night h2 em { color: var(--wheat); }
.night .intro { color: rgba(239, 229, 207, .75); }
.sky { position: relative; }
.sky canvas { display: block; width: 100%; aspect-ratio: 12 / 5; image-rendering: pixelated; border-radius: 10px; }
.your-shed { position: absolute; left: 52%; top: 22%; transform: translate(-50%, -100%); font: 1.1rem var(--serif); color: var(--ink); background: var(--parchment);
    border: 2px solid var(--wood-d); border-radius: 6px; padding: .3rem .8rem; cursor: pointer; box-shadow: 0 0 0 4px rgba(226, 194, 122, .25), 3px 4px 0 rgba(0, 0, 0, .4); }
.your-shed span { display: block; font: 600 .78rem var(--sans); color: var(--rust); }
.your-shed::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--wood-d); }
.your-shed:hover { transform: translate(-50%, -104%); }
.legend { display: flex; justify-content: center; gap: 2rem; margin-top: .9rem; font-size: 1rem; color: rgba(239, 229, 207, .75); }
.legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: .5rem; vertical-align: 1px; }
.legend .down::before { background: var(--wheat); box-shadow: 0 0 8px var(--wheat); }
.legend .up::before { background: #8fd3f0; box-shadow: 0 0 8px #8fd3f0; }
.inside { display: grid; grid-template-columns: 1.3fr 1fr; gap: 2.2rem; align-items: center; margin-top: 2rem; padding: 1.4rem; background: rgba(239, 229, 207, .05);
    border: 1px solid rgba(239, 229, 207, .14); border-radius: 10px; animation: unfold .3s ease-out; }
.inside[hidden] { display: none; }
.inside-view { position: relative; }
.inside-view canvas { display: block; width: 100%; aspect-ratio: 20 / 11; image-rendering: pixelated; border: 3px solid var(--wood-d); border-radius: 6px; }
.ipin { position: absolute; transform: translate(-50%, -50%); width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%;
    font: 1rem var(--serif); color: var(--ink); background: var(--wheat); border: 2px solid var(--wood-d); box-shadow: 0 0 0 3px rgba(226, 194, 122, .3); }
.inside-list { list-style: none; counter-reset: i; }
.inside-list li { counter-increment: i; position: relative; padding: .55rem 0 .55rem 2.4rem; color: rgba(239, 229, 207, .75); line-height: 1.4; border-bottom: 1px solid rgba(239, 229, 207, .08); }
.inside-list li::before { content: counter(i); position: absolute; left: 0; top: .6rem; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; font: .95rem var(--serif); color: var(--ink); background: var(--wheat); }
.inside-list b { display: block; font: 1.25rem var(--serif); font-weight: 400; color: var(--parchment); }

/* Beam of light from your shed up to the sky */
.beam { position: absolute; left: 6.6%; top: 0; width: 1.4%; height: 48.8%; background: linear-gradient(0deg, rgba(255, 241, 168, .75), rgba(255, 241, 168, 0));
    filter: blur(1px); animation: beam 3s ease-in-out infinite; }
@keyframes beam { 50% { opacity: .45; } }
@media (max-width: 900px) { .inside { grid-template-columns: 1fr; } .legend { flex-direction: column; align-items: center; gap: .3rem; } }

/* ---------- Learning layer: tagline, the Old Hand, stages ---------- */
.tagline { font: italic 1.5rem var(--serif); color: #24502f; margin: -1rem 0 1.6rem; letter-spacing: .01em; }
.tiles.six { grid-template-columns: repeat(6, 1fr); }
.tiles.six .tile { padding: 1.2rem .6rem 1rem; }
.tiles.six .tile img { width: 60px; }
.phone-q { background: rgba(250, 245, 232, .96); padding: 0 .8rem .7rem; font-size: .88rem; color: var(--ink); line-height: 1.35; }
.phone-q > p:nth-child(2) { font-weight: 700; margin: .2rem 0 .4rem; }
.q-who { display: flex; align-items: center; gap: .35rem; font: 600 .72rem var(--sans); color: var(--rust); text-transform: uppercase; letter-spacing: .05em; border-top: 1px solid #e3dccb; padding-top: .5rem; }
.q-who img { width: 22px; }
.q-opt { border: 1.5px solid #d8d0bd; border-radius: 8px; padding: .25rem .5rem; margin-top: .3rem; color: var(--ink-soft); }
.q-opt.on { border-color: var(--moss); background: #e7efdc; color: #2e4a22; font-weight: 600; }
.phone-screen { padding-top: 3rem; padding-bottom: 3.6rem; }
.oldhand { display: grid; grid-template-columns: 150px 1fr; gap: 2.4rem; align-items: center; margin-bottom: 3rem; }
.oldhand > img { width: 150px; filter: drop-shadow(4px 5px 0 rgba(43, 39, 34, .2)); }
.oldhand h2 { margin-bottom: 1rem; }
.bubble { position: relative; font: italic 1.3rem/1.45 var(--serif); color: var(--ink); background: rgba(255, 252, 242, .7); border: 2px solid var(--ink); border-radius: var(--hand); padding: 1rem 1.3rem; max-width: 760px; }
.bubble::before { content: ""; position: absolute; left: -14px; top: 1.4rem; border: 7px solid transparent; border-right-color: var(--ink); border-width: 7px 14px 7px 0; }
.stages { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; position: relative; }
.stages::before { content: ""; position: absolute; left: 10%; right: 10%; top: 58px; border-top: 2px dashed rgba(43, 39, 34, .35); }
.stages li { position: relative; text-align: center; padding: 0 .6rem; }
.stages img { width: 112px; margin: 0 auto .6rem; background: var(--parchment-2); position: relative; }
.stages h3 { font: 1.6rem var(--serif); }
.stages .how { font: italic 1rem var(--serif); color: var(--rust); margin-bottom: .4rem; }
.stages p:not(.how) { color: var(--ink-soft); font-size: 1.02rem; line-height: 1.4; }
.stages-note { margin-top: 2.4rem; text-align: center; color: var(--ink-soft); font-size: 1.02rem; }
@media (max-width: 1050px) { .tiles.six { grid-template-columns: repeat(3, 1fr); } .stages { grid-template-columns: repeat(2, 1fr); row-gap: 2rem; } .stages::before { display: none; } }
@media (max-width: 640px) { .tiles.six { grid-template-columns: repeat(2, 1fr); } .oldhand { grid-template-columns: 1fr; text-align: center; } .oldhand > img { margin: 0 auto; width: 110px; } .bubble::before { display: none; } }
.stages img { width: 116px; height: 116px; object-fit: contain; padding: 14px; border-radius: 50%; background: rgba(255, 252, 242, .7); border: 2px solid var(--ink); }
.stages::before { top: 58px; }

/* ---------- Prologue: the story reel ---------- */
.cinema { color: var(--parchment); background: radial-gradient(ellipse at 50% 0, rgba(226, 194, 122, .06), transparent 60%), #141414; }
.cinema::before { background-image: url("/img/edge-cinema.svg"); }
.cinema h2 { margin-bottom: 1.8rem; }
.reel { max-width: 980px; margin: 0 auto; }
.reel-frame { position: relative; background: #000; padding: 2.2% 0; border-radius: 6px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9); }
.reel-frame canvas { display: block; width: 100%; aspect-ratio: 2 / 1; image-rendering: pixelated; }
.reel-play { position: absolute; right: 1rem; bottom: 1.2rem; font: 600 .9rem var(--sans); color: #fff; background: rgba(0, 0, 0, .55); border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; padding: .35rem .9rem; cursor: pointer; }
.reel:not(.playing) .reel-play { right: 50%; bottom: 50%; transform: translate(50%, 50%); font-size: 1.15rem; padding: .7rem 1.4rem; background: var(--wheat); color: var(--ink); border: 0; }
.reel .dialog { margin-top: 1.2rem; }

/* ---------- Seed catalog: vintage packets that flip ---------- */
.packets { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.8rem; perspective: 1200px; }
.packet { position: relative; display: block; width: 100%; aspect-ratio: 3 / 4; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--ink);
    transform-style: preserve-3d; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.packets li:nth-child(odd) .packet { transform: rotate(-1.5deg); }
.packets li:nth-child(even) .packet { transform: rotate(1.2deg); }
.packet.flipped, .packets li .packet.flipped { transform: rotateY(180deg); }
.pk-front, .pk-back { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; backface-visibility: hidden; -webkit-backface-visibility: hidden;
    border: 2px solid var(--ink); border-radius: 4px 4px 10px 10px; box-shadow: 4px 6px 0 rgba(43, 39, 34, .22); overflow: hidden; }
.pk-front { padding: 0 1rem 1rem; background: var(--grain), #f6ecd2; }
.pk-front::before { content: ""; position: absolute; inset: 7px; border: 1.5px solid rgba(43, 39, 34, .5); border-radius: 2px 2px 7px 7px; pointer-events: none; }
.pk-co { align-self: stretch; margin: 0 -1rem; padding: .5rem 0 .4rem; text-align: center; font: .95rem var(--sc); letter-spacing: .12em; color: #fbf3df; background: var(--grain), var(--moss); border-bottom: 2px solid var(--ink); }
.packets li:nth-child(2) .pk-co { background: var(--grain), var(--rust); }
.packets li:nth-child(3) .pk-co { background: var(--grain), var(--heather); }
.packets li:nth-child(4) .pk-co { background: var(--grain), #3f6c8a; }
.pk-front img { width: 62%; margin: 1.3rem 0 .8rem; padding: 10px; border-radius: 50%; background: rgba(255, 252, 242, .9); border: 1.5px solid rgba(43, 39, 34, .4); }
.pk-name { font: 1.55rem/1.1 var(--serif); text-align: center; }
.pk-good { margin-top: .35rem; font: italic .98rem/1.3 var(--serif); color: var(--ink-soft); text-align: center; }
.pk-no { margin-top: auto; font: .78rem var(--sc); letter-spacing: .1em; color: var(--ink-soft); }
.pk-front .soon, .pk-front .ready { position: absolute; top: 3.2rem; right: .6rem; font: .78rem var(--sc); letter-spacing: .06em; padding: .1rem .45rem; border: 2px double currentColor; border-radius: 4px; transform: rotate(8deg); background: rgba(246, 236, 210, .85); }
.soon { color: var(--rust); }
.ready { color: var(--moss); }
.pk-back { transform: rotateY(180deg); align-items: stretch; text-align: left; padding: 1rem 1.1rem; background: var(--grain), #efe3c4; font-size: .95rem; line-height: 1.35; }
.pk-tag { font: italic 1.05rem/1.3 var(--serif); margin-bottom: .7rem; }
.pk-h { font: .8rem var(--sc); letter-spacing: .1em; color: var(--rust); border-bottom: 1px solid rgba(43, 39, 34, .3); padding-bottom: .15rem; margin: .3rem 0 .35rem; }
.pk-back ul, .pk-back ol { padding-left: 1.1rem; margin-bottom: .5rem; color: var(--ink-soft); }
.packet:hover .pk-front, .packet:focus-visible .pk-front { box-shadow: 6px 9px 0 rgba(43, 39, 34, .25); }
.bring { display: flex; align-items: center; justify-content: center; gap: .7rem; margin-top: 2.6rem; color: var(--ink-soft); font-size: 1.08rem; text-align: left; }
.bring img { width: 40px; flex: none; }
.tagline.small { font-size: 1.2rem; margin: -.6rem 0 1rem; color: var(--moss); }
@media (max-width: 1050px) { .packets { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .packets { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; } }

/* ---------- Hens in the farm scene ---------- */
.hen { position: absolute; width: calc(8 / 384 * 100%); aspect-ratio: 8 / 7; background: url("/img/hen-white.png") 0 0 / 200% 100%; image-rendering: pixelated;
    animation: peck var(--pk, 1.7s) steps(1) infinite, patrol var(--dur) linear infinite var(--delay, 0s); }
.hen.brown { background-image: url("/img/hen-brown.png"); }
.h1 { top: 87.5%; --a: 46%; --b: 52%; --dur: 14s; }
.h2 { top: 91.5%; --a: 49%; --b: 57%; --dur: 18s; --delay: -6s; --pk: 1.3s; }
.h3 { top: 89.5%; --a: 53%; --b: 58%; --dur: 11s; --delay: -3s; --pk: 2.1s; }
.h4 { top: 93.5%; --a: 44%; --b: 50%; --dur: 16s; --delay: -9s; --pk: 1.5s; }
@keyframes peck { 0%, 60% { background-position: 0 0; } 61%, 100% { background-position: 100% 0; } }
@media (prefers-reduced-motion: reduce) { .hen { animation: none; left: var(--a); } }
.pin.egg { background: var(--parchment); border-color: var(--wood-d); }
.pin.egg img { width: 80%; }

