/* =========================================================
   PORCADIA — pixel pig farm
   Painted-wood boards, hanging signs and pig passports over
   scroll-driven farm scenes. Motion lives in motion.js (GSAP);
   the page is complete without it.
   ========================================================= */

*,
*::before,
*::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* palette: Wet Charcoal · Rosarian cream · Harmonious Rose · Solarized + farm golds */
    --char: #222023;
    --char-2: #2d2a2e;
    --char-3: #3a363b;
    --cream: #FAEADD;
    --cream-2: #f3dfcd;
    --seam: #e2c8b2;
    --white: #fffcf4;
    --rose: #F29CB7;
    --rose-d: #c9728f;
    --rose-dd: #9e4a61;
    --sun: #FBCF4F;
    --gold: #e8b43a;
    --gold-d: #c99a2e;
    --peach: #F5A07A;
    --leaf: #7ccf5a;
    --night: #222023;

    --f-display: 'Jersey 10', 'Tiny5', system-ui, sans-serif;
    --f-label: 'Tiny5', 'Jersey 10', monospace;
    --f-body: 'Space Mono', ui-monospace, monospace;

    --top-h: 68px;
    --notch: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
    --circle: polygon(30% 0, 70% 0, 70% 6%, 82% 6%, 82% 12%, 88% 12%, 88% 18%, 94% 18%, 94% 30%, 100% 30%, 100% 70%, 94% 70%, 94% 82%, 88% 82%, 88% 88%, 82% 88%, 82% 94%, 70% 94%, 70% 100%, 30% 100%, 30% 94%, 18% 94%, 18% 88%, 12% 88%, 12% 82%, 6% 82%, 6% 70%, 0 70%, 0 30%, 6% 30%, 6% 18%, 12% 18%, 12% 12%, 18% 12%, 18% 6%, 30% 6%);
}

/* a 4px charcoal outline with notched corners + a soft drop, drawn with shadows */
* { --line: var(--char); --outline: 0 -4px 0 0 var(--line), 0 4px 0 0 var(--line), -4px 0 0 0 var(--line), 4px 0 0 0 var(--line); }

html { scroll-behavior: smooth; scroll-padding-top: var(--top-h); }
html.has-gsap { scroll-behavior: auto; }
body {
    background: var(--char);
    color: var(--char);
    font-family: var(--f-body);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; image-rendering: pixelated; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; line-height: 0.95; letter-spacing: 0.01em; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 28px; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 2000; padding: 10px 16px; background: var(--sun); font-family: var(--f-label); text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- buttons ---------- */
.btn {
    --face: var(--sun);
    --side: var(--gold-d);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px 16px;
    border: 0;
    background: var(--face);
    color: var(--char);
    font-family: var(--f-display);
    font-size: 26px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    clip-path: var(--notch);
    box-shadow: inset 0 -6px 0 var(--side), inset 0 4px 0 rgba(255, 255, 255, 0.5), inset 0 0 0 3px var(--char);
    transition: transform 0.12s steps(2), filter 0.15s;
}
.btn:hover { transform: translateY(-3px); filter: brightness(1.05); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -2px 0 var(--side), inset 0 0 0 3px var(--char); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; filter: grayscale(0.3); }
.btn-sun { --face: var(--sun); --side: var(--gold-d); }
.btn-rose { --face: var(--rose); --side: var(--rose-d); }
.btn-cream { --face: var(--white); --side: var(--seam); }
.btn.is-live { --face: var(--sun); --side: var(--gold-d); }
.btn-sm { font-size: 20px; padding: 8px 14px 11px; }
.btn-wide { width: 100%; }
.link-btn { background: none; border: 0; font-family: var(--f-label); font-size: 13px; color: var(--rose-dd); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

/* ---------- small wooden tag ---------- */
.tag {
    display: inline-block;
    padding: 4px 12px 5px;
    font-family: var(--f-label);
    font-size: 13px;
    background: var(--white);
    box-shadow: var(--outline);
}
.tag-sun { background: var(--sun); }

/* ---------- painted-wood board ---------- */
.board {
    position: relative;
    padding: 26px 24px 24px;
    background:
        radial-gradient(circle at 12px 12px, var(--char-3) 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 12px) 12px, var(--char-3) 0 3px, transparent 4px),
        radial-gradient(circle at 12px calc(100% - 12px), var(--char-3) 0 3px, transparent 4px),
        radial-gradient(circle at calc(100% - 12px) calc(100% - 12px), var(--char-3) 0 3px, transparent 4px),
        repeating-linear-gradient(180deg, var(--cream) 0 44px, var(--seam) 44px 47px, var(--cream-2) 47px 48px);
    box-shadow: var(--outline), 10px 12px 0 0 rgba(0, 0, 0, 0.3);
}
.board-title {
    display: inline-block;
    margin-bottom: 18px;
    padding: 2px 14px 6px;
    font-size: 30px;
    background: var(--rose);
    box-shadow: var(--outline), inset 0 -5px 0 var(--rose-d);
}

/* ---------- hanging sign (section titles) ---------- */
.sign {
    position: relative;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 44px;
    padding: 14px 34px 18px;
    background: repeating-linear-gradient(180deg, var(--white) 0 30px, var(--seam) 30px 33px);
    box-shadow: var(--outline), 8px 10px 0 rgba(0, 0, 0, 0.3);
    transform-origin: 50% -60px;
}
.sign h2 { font-size: clamp(44px, 6vw, 76px); text-align: center; }
.sign-rope {
    position: absolute;
    left: 18%; right: 18%;
    bottom: 100%;
    height: 60px;
    background:
        linear-gradient(var(--char), var(--char)) 0 0 / 4px 100% no-repeat,
        linear-gradient(var(--char), var(--char)) 100% 0 / 4px 100% no-repeat;
}
.lead {
    width: max-content;
    max-width: min(640px, 100%);
    margin: -20px auto 36px;
    padding: 8px 16px;
    text-align: center;
    background: var(--white);
    box-shadow: var(--outline);
}

.sec { position: relative; padding: 120px 0; }

/* =========================================================
   TOP BAR
   ========================================================= */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 80;
    height: var(--top-h);
    background: repeating-linear-gradient(180deg, var(--cream) 0 30px, var(--seam) 30px 33px);
    box-shadow: 0 4px 0 var(--char), 0 10px 0 rgba(0, 0, 0, 0.15);
}
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 20px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo img { width: 44px; height: 44px; box-shadow: var(--outline); }
.logo span { font-family: var(--f-display); font-size: 34px; line-height: 1; }
.menu { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.menu a { font-family: var(--f-label); font-size: 14px; text-decoration: none; padding: 4px 0; border-bottom: 3px solid transparent; }
.menu a:hover, .menu a.is-active { border-bottom-color: var(--rose-d); }
.menu-toggle { display: none; margin-left: auto; padding: 8px 14px; background: var(--white); border: 0; box-shadow: var(--outline); font-family: var(--f-label); cursor: pointer; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
    min-height: 100vh;
    min-height: 100svh;
    padding: calc(var(--top-h) + 56px) 0 calc(var(--farm-w) / 3 * 0.56);
    background: url("assets/farm-hero.png") 50% 100% / var(--farm-w) auto no-repeat, #fffcf4;
    image-rendering: pixelated;
    overflow: hidden;
}
:root { --farm-w: max(100vw, 120vh); }
.hero-grid { display: grid; grid-template-columns: 1.35fr 0.65fr; gap: 30px; align-items: start; }
.hero-title { font-size: clamp(56px, 7.2vw, 108px); margin: 18px 0 20px; color: var(--char); text-shadow: 5px 5px 0 var(--rose); }
.hero-title em { font-style: normal; color: var(--rose-dd); text-shadow: 5px 5px 0 var(--sun); }
.hero-sub { max-width: 520px; font-size: 16px; margin-bottom: 26px; padding: 10px 14px; background: rgba(255, 252, 244, 0.85); box-shadow: var(--outline); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.hero-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-chips li { padding: 4px 10px; font-family: var(--f-label); font-size: 12px; background: var(--white); box-shadow: var(--outline); }
.hero-chips b { font-weight: 400; color: var(--rose-dd); }
.hero-cards { position: relative; height: 420px; }
.hero-cards .pcard { position: absolute; left: 50%; top: 10px; width: 250px; margin-left: -125px; cursor: pointer; }

/* ---------- pig card (polaroid) ---------- */
.pcard {
    display: block;
    padding: 10px 10px 0;
    background: var(--white);
    border: 0;
    box-shadow: var(--outline), 8px 10px 0 rgba(0, 0, 0, 0.3);
    text-align: left;
    cursor: pointer;
    transition: transform 0.15s steps(2);
}
.pcard .photo { position: relative; aspect-ratio: 1; overflow: hidden; box-shadow: 0 0 0 3px var(--char); }
.pcard .photo img { width: 100%; height: 100%; object-fit: cover; }
.pcard .caption { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 2px 10px; }
.pcard .caption b { font-family: var(--f-display); font-size: 28px; font-weight: 400; line-height: 1; }
.pcard .caption span { font-family: var(--f-label); font-size: 11px; color: var(--rose-dd); }
.ribbon {
    position: absolute;
    top: 10px; right: -4px;
    padding: 2px 10px 3px;
    font-family: var(--f-label);
    font-size: 11px;
    background: var(--white);
    box-shadow: var(--outline);
}
.ribbon.epic { background: var(--rose); }
.ribbon.exclusive { background: var(--sun); }
.pcard:hover { transform: translateY(-6px) rotate(-1.5deg); }
.pcard.hide { display: none; }

/* =========================================================
   FARM NEWS
   ========================================================= */
.news {
    position: relative;
    z-index: 3;
    overflow: hidden;
    background: var(--rose);
    box-shadow: inset 0 4px 0 var(--char), inset 0 -4px 0 var(--char), inset 0 -10px 0 var(--rose-d);
}
.news-track { display: flex; width: max-content; }
html:not(.has-gsap) .news-track { animation: news 40s linear infinite; }
@keyframes news { to { transform: translateX(-50%); } }
.news p { padding: 14px 32px 18px; font-family: var(--f-display); font-size: 26px; white-space: nowrap; }

/* =========================================================
   HOW IT WORKS — signposts
   ========================================================= */
.posts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; align-items: end; }
.post { display: flex; flex-direction: column; align-items: center; }
.post-board {
    position: relative;
    width: 100%;
    padding: 22px 22px 24px;
    text-align: center;
    background: repeating-linear-gradient(180deg, var(--cream) 0 40px, var(--seam) 40px 43px);
    box-shadow: var(--outline), 8px 10px 0 rgba(0, 0, 0, 0.3);
}
.post-board img { width: 120px; margin: -70px auto 6px; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.35)); }
.post-board h3 { font-size: 46px; margin-bottom: 8px; }
.post-board p { font-size: 14px; }
.post-no {
    position: absolute;
    top: 12px; left: 12px;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    font-family: var(--f-display);
    font-size: 28px;
    background: var(--sun);
    clip-path: var(--circle);
}
.post-leg { width: 20px; height: 70px; background: repeating-linear-gradient(180deg, var(--seam) 0 18px, var(--cream-2) 18px 22px); box-shadow: var(--outline); }

/* =========================================================
   THE BARN
   ========================================================= */
.barn-status { width: max-content; max-width: 100%; margin: -20px auto 30px; padding: 8px 16px; background: var(--sun); box-shadow: var(--outline); text-align: center; }
.barn-top { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; margin-bottom: 32px; }
.adopt-body { display: grid; grid-template-columns: 200px 1fr; gap: 26px; align-items: center; margin-bottom: 20px; }
.crate-stack { position: relative; height: 200px; }
.crate-stack img { position: absolute; width: 140px; box-shadow: var(--outline); }
.crate-stack img:nth-child(1) { left: 0; top: 50px; transform: rotate(-8deg); }
.crate-stack img:nth-child(2) { left: 50px; top: 0; transform: rotate(6deg); }
.crate-stack img:nth-child(3) { left: 30px; top: 60px; }
.adopt-odds { font-size: 14px; margin-bottom: 14px; }
.t-common { color: var(--char); }
.t-epic { color: var(--rose-dd); }
.t-ex { color: var(--gold-d); }
.stepper { display: inline-flex; align-items: stretch; margin-bottom: 14px; box-shadow: var(--outline); }
.stepper button { width: 48px; border: 0; background: var(--rose); font-family: var(--f-display); font-size: 32px; cursor: pointer; }
.stepper button:hover { background: var(--rose-d); }
.stepper output { min-width: 70px; display: grid; place-items: center; font-family: var(--f-display); font-size: 38px; background: var(--white); }
.adopt-info { margin-top: 10px; font-family: var(--f-label); font-size: 12px; }
.progress { height: 22px; padding: 4px; background: var(--white); box-shadow: var(--outline); }
.progress i { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--rose) 0 12px, var(--rose-d) 12px 16px); transition: width 0.4s steps(6); }
.progress-label { margin-top: 10px; font-family: var(--f-label); font-size: 12px; }
.progress-label b { font-weight: 400; color: var(--rose-dd); }

.farmer-addr { font-family: var(--f-label); font-size: 14px; margin-bottom: 14px; }
.farmer-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.farmer-stats div { padding: 10px 12px; background: var(--white); box-shadow: var(--outline); }
.farmer-stats dt { font-family: var(--f-label); font-size: 11px; color: var(--rose-dd); }
.farmer-stats dd { font-family: var(--f-display); font-size: 30px; line-height: 1.1; }

.barn-bottom { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.pen-head { display: flex; justify-content: space-between; align-items: baseline; }
.pen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; max-height: 620px; overflow-y: auto; padding: 6px; }
.pen-grid .empty { grid-column: 1 / -1; padding: 30px 0; text-align: center; }
.penpig {
    position: relative;
    padding: 6px 6px 0;
    background: var(--white);
    border: 0;
    box-shadow: var(--outline);
    cursor: pointer;
    text-align: left;
    transition: transform 0.12s steps(2);
}
.penpig:hover { transform: translateY(-3px); }
.penpig .photo { aspect-ratio: 1; overflow: hidden; box-shadow: 0 0 0 2px var(--char); }
.penpig .photo img { width: 100%; height: 100%; object-fit: cover; }
.penpig .meta { padding: 6px 2px 8px; }
.penpig .meta b { display: block; font-family: var(--f-display); font-size: 22px; font-weight: 400; line-height: 1; }
.penpig .meta small { font-family: var(--f-label); font-size: 10px; }
.penpig .state { position: absolute; top: 10px; left: 10px; padding: 1px 6px 2px; font-family: var(--f-label); font-size: 10px; background: var(--white); box-shadow: var(--outline); }
.penpig .state.ready { background: var(--leaf); }
.penpig .state.rest { background: var(--peach); }
.penpig .state.crate { background: var(--sun); }
.penpig.picked { --line: var(--rose-dd); transform: translateY(-4px); }
.penpig.picked::after {
    content: "♥";
    position: absolute;
    top: -10px; right: -10px;
    width: 30px; height: 30px;
    display: grid; place-items: center;
    background: var(--rose);
    font-size: 16px;
    clip-path: var(--circle);
}
.penpig.unavailable { opacity: 0.6; }

.breed-slots { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 18px; }
.slot {
    width: 130px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    background: repeating-linear-gradient(45deg, var(--cream-2) 0 8px, var(--white) 8px 16px);
    box-shadow: var(--outline);
    font-family: var(--f-label);
    font-size: 12px;
    overflow: hidden;
}
.slot img { width: 100%; height: 100%; object-fit: cover; }
.heart { font-size: 34px; color: var(--rose-d); }
.breed-odds { margin-bottom: 14px; }
.breed-odds > p { font-family: var(--f-label); font-size: 12px; margin-bottom: 6px; }
.odds-row { display: grid; grid-template-columns: 80px 1fr 48px; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.odds-row i { height: 16px; padding: 3px; background: var(--white); box-shadow: var(--outline); }
.odds-row i b { display: block; height: 100%; width: 10%; background: var(--rose); transition: width 0.3s steps(5); }
.odds-row:last-child i b { background: var(--sun); }
.odds-row em { font-style: normal; font-family: var(--f-display); font-size: 24px; text-align: right; }
.breed-hint { font-size: 13px; margin-bottom: 12px; min-height: 2.6em; }
.breed-fee { margin-top: 10px; font-family: var(--f-label); font-size: 11px; text-align: center; }

.farmer-stats .wide { grid-column: 1 / -1; }
.pay-toggle { display: flex; margin-bottom: 14px; box-shadow: var(--outline); }
.pay-opt { flex: 1; padding: 8px 6px 10px; border: 0; background: var(--white); font-family: var(--f-display); font-size: 22px; cursor: pointer; }
.pay-opt.active { background: var(--sun); }
.rewards { margin-top: 32px; }
.rewards-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 24px; align-items: start; }
.season-name { font-family: var(--f-display); font-size: 40px; line-height: 1; }
.season-left { font-family: var(--f-label); font-size: 13px; margin: 6px 0 10px; }
.season-pool { margin-top: 10px; font-size: 14px; }
.season-you p, .season-claim p { font-size: 14px; margin-bottom: 6px; }
.season-you b { display: block; font-family: var(--f-display); font-size: 64px; line-height: 1; color: var(--rose-dd); }
.season-you small { font-size: 12px; }
.season-claim .btn { margin-top: 8px; }
.uses { margin-top: 22px; padding: 14px 16px; background: var(--white); box-shadow: var(--outline); font-size: 14px; }
.uses p + p { margin-top: 4px; }
@media (max-width: 900px) { .rewards-grid { grid-template-columns: 1fr; } }

/* =========================================================
   HERD
   ========================================================= */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 34px; }
.filter { padding: 6px 16px 8px; border: 0; background: var(--white); box-shadow: var(--outline); font-family: var(--f-display); font-size: 22px; cursor: pointer; }
.filter.active { background: var(--rose); }
.herd-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 26px; }

/* =========================================================
   NEWBORNS
   ========================================================= */
.nursery { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; }
.birth-list, .breeder-list { list-style: none; }
.birth-list li { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 3px dotted var(--seam); }
.birth-list img { width: 56px; height: 56px; object-fit: cover; box-shadow: 0 0 0 3px var(--char); }
.birth-list b { font-family: var(--f-display); font-size: 24px; font-weight: 400; }
.birth-list small { display: block; font-size: 12px; }
.birth-list .when { margin-left: auto; font-family: var(--f-label); font-size: 11px; white-space: nowrap; }
.breeder-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 3px dotted var(--seam); font-size: 14px; }
.breeder-list li.mine b { color: var(--rose-dd); }
.breeder-list em { font-style: normal; font-family: var(--f-display); font-size: 22px; }
.empty { font-size: 14px; }
.stat-line { margin-top: 14px; font-family: var(--f-label); font-size: 12px; }
.stat-line b { font-weight: 400; font-family: var(--f-display); font-size: 26px; color: var(--rose-dd); }

/* =========================================================
   FARM ECONOMY
   ========================================================= */
.loop { position: relative; width: min(440px, 100%); aspect-ratio: 1; margin: 90px auto 80px; }
.loop-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.loop-ring circle { fill: none; stroke: var(--white); stroke-width: 8; stroke-dasharray: 18 12; }
.loop-node {
    position: absolute;
    width: 180px;
    padding: 8px 10px 10px;
    text-align: center;
    background: var(--white);
    box-shadow: var(--outline), 6px 8px 0 rgba(0, 0, 0, 0.3);
    z-index: 2;
}
.loop-node b { display: block; font-family: var(--f-display); font-size: 24px; font-weight: 400; line-height: 1; }
.loop-node span { font-size: 12px; }
.loop-node.n1 { left: 50%; top: 0; transform: translate(-50%, -30%); background: var(--sun); }
.loop-node.n2 { right: 0; top: 50%; transform: translate(30%, -50%); background: var(--rose); }
.loop-node.n3 { left: 50%; bottom: 0; transform: translate(-50%, 30%); }
.loop-node.n4 { left: 0; top: 50%; transform: translate(-30%, -50%); background: var(--peach); }
.loop-dot { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--sun); box-shadow: 0 0 0 3px var(--char); z-index: 1; }
.econ-grid { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 28px; align-items: start; }
.oink-table table { width: 100%; border-collapse: collapse; }
.oink-table td { padding: 8px 0; border-bottom: 3px dotted var(--seam); font-size: 15px; }
.oink-table td:first-child { display: flex; align-items: center; gap: 10px; }
.oink-table td:last-child { text-align: right; font-family: var(--f-display); font-size: 32px; }
.oink-table img { width: 44px; }
.note { margin-top: 12px; font-size: 12px; }
.oink-big { font-size: 16px; line-height: 1.2; }
.oink-big b { font-family: var(--f-display); font-size: 88px; font-weight: 400; line-height: 0.9; color: var(--rose-dd); }
.oink-row { display: flex; gap: 6px; margin-top: 12px; }
.oink-row img { width: 25%; }
.pie {
    width: 180px;
    aspect-ratio: 1;
    margin: 0 auto 18px;
    clip-path: var(--circle);
    background: conic-gradient(var(--sun) 0 50%, var(--rose) 50% 75%, var(--white) 75% 85%, var(--peach) 85% 95%, var(--char-3) 95% 100%);
    box-shadow: inset 0 0 0 4px var(--char);
}
.legend { list-style: none; }
.legend li { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; border-bottom: 3px dotted var(--seam); }
.legend b { margin-left: auto; font-family: var(--f-display); font-size: 24px; font-weight: 400; }
.legend i { width: 14px; height: 14px; flex: none; box-shadow: 0 0 0 2px var(--char); }
.lg1 { background: var(--sun); } .lg2 { background: var(--rose); } .lg3 { background: var(--white); } .lg4 { background: var(--peach); } .lg5 { background: var(--char-3); }
.fact-list { list-style: none; }
.fact-list li { padding: 8px 0; border-bottom: 3px dotted var(--seam); font-size: 14px; }
.fact-list b { font-family: var(--f-display); font-size: 26px; font-weight: 400; color: var(--rose-dd); margin-right: 6px; }
.soon { display: inline-block; padding: 2px 10px 3px; font-family: var(--f-label); font-size: 11px; font-weight: 400; background: var(--sun); box-shadow: var(--outline); }

/* =========================================================
   FARM ROAD
   ========================================================= */
.roadway { position: relative; max-width: 860px; margin: 0 auto; padding: 20px 0 40px; display: grid; gap: 70px; }
.path { position: absolute; left: 50%; top: 0; bottom: 0; width: 44px; margin-left: -22px; background: repeating-linear-gradient(180deg, var(--seam) 0 24px, var(--cream-2) 24px 30px); box-shadow: var(--outline); }
.path-fill { position: absolute; inset: 0; background: repeating-linear-gradient(180deg, var(--sun) 0 24px, var(--gold) 24px 30px); transform-origin: 50% 0; transform: scaleY(0); }
.road-pig { position: absolute; left: 50%; top: 0; width: 90px; margin-left: -45px; z-index: 3; filter: drop-shadow(4px 4px 0 rgba(0, 0, 0, 0.35)); }
.stop {
    position: relative;
    width: calc(50% - 60px);
    padding: 18px 20px 20px;
    background: repeating-linear-gradient(180deg, var(--cream) 0 40px, var(--seam) 40px 43px);
    box-shadow: var(--outline), 8px 10px 0 rgba(0, 0, 0, 0.3);
    z-index: 2;
}
.stop:nth-of-type(even) { justify-self: end; }
.stop span { font-family: var(--f-label); font-size: 12px; color: var(--rose-dd); }
.stop h3 { font-size: 40px; margin: 4px 0 6px; }
.stop p { font-size: 14px; }

/* =========================================================
   JOIN + FOOTER
   ========================================================= */
.join { padding-bottom: 0; }
.mailbox { max-width: 620px; margin: 0 auto; text-align: center; }
.mailbox h2 { font-size: clamp(48px, 6vw, 72px); margin-bottom: 10px; }
.mailbox > p { margin-bottom: 20px; }
.subscribe { display: flex; gap: 10px; }
.subscribe input { flex: 1; min-width: 0; padding: 0 14px; border: 0; background: var(--white); box-shadow: var(--outline); font: inherit; outline: none; }
.subscribe input:focus { box-shadow: var(--outline), inset 0 0 0 3px var(--rose); }
.form-msg { min-height: 1.6em; margin-top: 12px; }
.lineup { display: flex; justify-content: center; gap: 10px; margin-top: 60px; }
.lineup img { width: 150px; filter: drop-shadow(4px 0 0 rgba(0, 0, 0, 0.3)); }
.foot { position: relative; z-index: 2; background: var(--char); color: var(--cream); }
.foot-fence {
    height: 60px;
    background:
        linear-gradient(var(--white), var(--white)) 0 16px / 100% 8px no-repeat,
        linear-gradient(var(--white), var(--white)) 0 36px / 100% 8px no-repeat,
        repeating-linear-gradient(90deg, var(--white) 0 16px, transparent 16px 56px) 0 0 / 100% 100%,
        var(--leaf);
    box-shadow: inset 0 -12px 0 #4c9a3c;
}
.foot-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-top: 34px; padding-bottom: 34px; }
.foot .logo span { color: var(--cream); }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; }
.foot nav a { font-family: var(--f-label); font-size: 13px; text-decoration: none; }
.foot nav a:hover { color: var(--rose); }
.foot-grid > p { width: 100%; font-family: var(--f-label); font-size: 11px; color: var(--seam); }

/* =========================================================
   PIG PASSPORT
   ========================================================= */
.passport { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; }
.passport-backdrop { position: absolute; inset: 0; background: rgba(34, 32, 35, 0.8); }
.passport-card {
    position: relative;
    width: min(760px, 100%);
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 0 26px 26px;
    background: repeating-linear-gradient(180deg, var(--white) 0 26px, var(--cream) 26px 28px);
    box-shadow: var(--outline), 14px 16px 0 rgba(0, 0, 0, 0.35);
}
.passport-kicker { margin: 0 -26px 22px; padding: 10px 26px; font-family: var(--f-display); font-size: 28px; background: var(--rose); box-shadow: 0 4px 0 var(--char); }
.passport-close { position: absolute; top: 8px; right: 10px; width: 34px; height: 34px; border: 0; background: var(--white); box-shadow: var(--outline); cursor: pointer; z-index: 2; }
.passport-body { display: grid; grid-template-columns: 260px 1fr; gap: 26px; }
.passport-photo { aspect-ratio: 1; overflow: hidden; box-shadow: var(--outline); }
.passport-photo img { width: 100%; height: 100%; object-fit: cover; }
.passport-info h3 { font-size: 56px; }
.passport-tier { display: inline-block; margin: 6px 0 16px; padding: 2px 10px 3px; font-family: var(--f-label); font-size: 12px; background: var(--white); box-shadow: var(--outline); }
.passport-tier.epic { background: var(--rose); }
.passport-tier.exclusive { background: var(--sun); }
.passport-info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin-bottom: 20px; font-size: 14px; }
.passport-info dt { font-family: var(--f-label); font-size: 11px; color: var(--rose-dd); padding-top: 3px; }
.passport-stamp {
    position: absolute;
    right: 70px; top: 70px;
    padding: 4px 12px;
    font-family: var(--f-display);
    font-size: 30px;
    color: var(--rose-d);
    box-shadow: inset 0 0 0 4px var(--rose-d);
    transform: rotate(-12deg);
    opacity: 0.55;
    pointer-events: none;
}

/* wallet picker */
.wallet-modal { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 16px; }
.wallet-backdrop { position: absolute; inset: 0; background: rgba(34, 32, 35, 0.8); }
.wallet-card {
    position: relative;
    width: min(420px, 100%);
    padding: 0 22px 22px;
    background: repeating-linear-gradient(180deg, var(--white) 0 26px, var(--cream) 26px 28px);
    box-shadow: var(--outline), 12px 14px 0 rgba(0, 0, 0, 0.35);
}
.wallet-card .passport-kicker { margin: 0 -22px 16px; padding: 10px 22px; }
.wallet-note { font-size: 14px; margin-bottom: 14px; }
.wallet-list { display: grid; gap: 12px; }
.wallet-opt {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border: 0;
    background: var(--white);
    box-shadow: var(--outline);
    font-family: var(--f-display); font-size: 26px;
    text-align: left; text-decoration: none; cursor: pointer;
}
.wallet-opt:hover { background: var(--rose); }
.wallet-opt img { width: 32px; height: 32px; }

/* =========================================================
   FLOATING UI
   ========================================================= */
.dock { position: fixed; right: 18px; bottom: 18px; z-index: 60; }
.dock .btn { font-size: 22px; }
.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 200;
    max-width: calc(100vw - 32px);
    padding: 12px 20px;
    background: var(--white);
    box-shadow: var(--outline), 6px 6px 0 rgba(0, 0, 0, 0.35);
    transform: translate(-50%, calc(100% + 40px));
    visibility: hidden;
    transition: transform 0.3s steps(4);
}
.toast.show { transform: translate(-50%, 0); visibility: visible; }

/* barn doors (first visit): CSS covers the page until motion.js swings them open */
html.doors-shut body::before,
html.doors-shut body::after,
.door {
    content: "";
    position: fixed;
    top: 0; bottom: 0;
    width: 50.5%;
    z-index: 1000;
    background:
        linear-gradient(var(--white), var(--white)) 0 0 / 100% 16px no-repeat,
        linear-gradient(var(--white), var(--white)) 0 100% / 100% 16px no-repeat,
        linear-gradient(to top right, transparent calc(50% - 8px), var(--white) calc(50% - 8px) calc(50% + 8px), transparent calc(50% + 8px)),
        linear-gradient(to top left, transparent calc(50% - 8px), var(--white) calc(50% - 8px) calc(50% + 8px), transparent calc(50% + 8px)),
        repeating-linear-gradient(90deg, var(--rose) 0 60px, var(--rose-d) 60px 64px);
    box-shadow: inset 0 0 0 8px var(--white), inset 0 0 0 12px var(--char);
}
html.doors-shut body::before, .door.left { left: 0; }
html.doors-shut body::after, .door.right { right: 0; }
.door span { position: absolute; top: 50%; right: 24px; width: 20px; height: 60px; margin-top: -30px; background: var(--sun); box-shadow: 0 0 0 4px var(--char); }
.door.right span { right: auto; left: 24px; }

/* =========================================================
   FARM FX (motion.js): crates opening, breeding hearts
   ========================================================= */
.fx { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(34, 32, 35, 0.86); cursor: pointer; overflow: hidden; }
.fx-title { position: absolute; top: 10%; left: 0; right: 0; text-align: center; font-family: var(--f-display); font-size: clamp(56px, 10vw, 120px); color: var(--sun); text-shadow: 6px 6px 0 var(--rose-dd); }
.fx-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; max-width: 980px; padding: 20px; }
.fx-crate { position: relative; width: var(--s, 160px); }
.fx-crate .box, .fx-crate .pig { width: 100%; aspect-ratio: 1; box-shadow: var(--outline); }
.fx-crate .pig { position: absolute; inset: 0; background: var(--white); padding: 8px; opacity: 0; }
.fx-crate .pig img { width: 100%; height: 100%; object-fit: cover; }
.fx-crate .label { position: absolute; left: 0; right: 0; bottom: -40px; text-align: center; font-family: var(--f-display); font-size: 26px; color: var(--cream); opacity: 0; }
.fx-crate .label.epic { color: var(--rose); }
.fx-crate .label.exclusive { color: var(--sun); }
.fx-bit { position: absolute; width: 10px; height: 10px; pointer-events: none; }
.fx-heart { position: absolute; font-size: 40px; color: var(--rose); pointer-events: none; }
.fx-parent { position: absolute; top: 50%; width: 180px; margin-top: -90px; box-shadow: var(--outline); }
.fx-continue { position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%); font-family: var(--f-label); color: var(--cream); font-size: 13px; opacity: 0; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1100px) {
    .herd-grid { grid-template-columns: repeat(4, 1fr); }
    .barn-top, .barn-bottom, .nursery { grid-template-columns: 1fr; }
    .econ-grid { grid-template-columns: 1fr 1fr; }
    .econ-grid .facts { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    :root { --top-h: 60px; --farm-w: max(100vw, 88vh); }
    .wrap { padding: 0 16px; }
    .menu-toggle { display: block; }
    .menu {
        position: absolute;
        top: calc(100% + 8px);
        left: 16px; right: 16px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 10px;
        background: var(--cream);
        box-shadow: var(--outline), 8px 10px 0 rgba(0, 0, 0, 0.3);
        display: none;
    }
    .menu.open { display: flex; }
    .menu a { padding: 12px 8px; border-bottom: 3px dotted var(--seam); }
    .menu .btn { margin-top: 10px; }
    .sec { padding: 90px 0; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-cards { order: -1; height: 250px; }
    .hero-cards .pcard { width: 170px; margin-left: -85px; }
    .posts { grid-template-columns: 1fr; gap: 70px; max-width: 420px; margin: 0 auto; }
    .herd-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
    .econ-grid { grid-template-columns: 1fr; }
    .passport-body { grid-template-columns: 1fr; }
    .passport-photo { max-width: 260px; }
    .path { left: 22px; }
    .road-pig { left: 22px; width: 64px; margin-left: -32px; }
    .stop, .stop:nth-of-type(even) { width: auto; margin-left: 64px; justify-self: stretch; }
    .lineup img { width: 90px; }
}
@media (max-width: 560px) {
    .hero-title { text-shadow: 4px 4px 0 var(--rose); }
    .hero-cta .btn { flex: 1; font-size: 21px; padding: 11px 10px 14px; white-space: nowrap; }
    .hero-chips { display: none; }
    .adopt-body { grid-template-columns: 1fr; }
    .crate-stack { height: 150px; margin: 0 auto; width: 200px; }
    .crate-stack img { width: 110px; }
    .loop-node { width: 130px; }
    .loop-node.n2 { transform: translate(0, -50%); }
    .loop-node.n4 { transform: translate(0, -50%); }
    .loop-node b { font-size: 18px; }
    .subscribe { flex-direction: column; }
    .subscribe input { padding: 12px; }
    .lineup img { width: 64px; }
    .dock .btn { font-size: 18px; padding: 8px 12px 11px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}

/* =========================================================
   WORLD — fixed pig-farm scenery behind the page. One scene per
   chapter (a day on the farm); motion.js wipes between them.
   ========================================================= */
.world { display: none; }
html.world-on .world {
    display: block;
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    background: var(--night);
}
html.world-on .sec { background: transparent; }

.scene { position: absolute; inset: 0; overflow: hidden; }
.scene > * { position: absolute; }
.cloud { width: 240px; height: 80px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 8' shape-rendering='crispEdges'%3E%3Cpath fill='%23ffffff' d='M8 0h8v1H8zM6 1h12v1H6zM3 2h18v1H3zM1 3h22v2H1zM0 5h24v1H0z'/%3E%3Cpath fill='%23FAEADD' d='M2 6h20v1H2zM4 7h16v1H4z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; image-rendering: pixelated; }

/* 1 · hero: the pig pen (farm-hero.png), bright sky, clouds, golden dust */
.farm-sky {
    inset: 0;
    background: linear-gradient(180deg, #fcf3ec 0 18%, #fffcf4 18% 40%, #ffffff 40%);
}
.farm-img {
    left: 50%;
    bottom: 0;
    width: var(--farm-w);
    aspect-ratio: 3 / 1;
    margin-left: calc(var(--farm-w) / -2);
    background: url("assets/farm-hero.png") center / 100% 100% no-repeat;
    image-rendering: pixelated;
    transform-origin: 50% 100%;
}
.cloud.c1 { top: 14%; left: 8%; }
.cloud.c2 { top: 30%; left: 60%; width: 180px; height: 60px; }
.cloud.c3 { top: 8%; left: 78%; width: 140px; height: 46px; opacity: 0.8; }
.dust { inset: 0; }
.dust i { position: absolute; top: -10px; width: 5px; height: 5px; background: #f2b93a; }
.dust i.w { background: #ffffff; }

/* 2 · story: rolling hills at sunset */
.scene-fields { background: linear-gradient(180deg, #3e232a 0%, #6a2f3e 38%, #a46c7a 64%, #e79aa4 78%, #f4b183 88%); }
.sunset-sun {
    left: 58%; bottom: 26%;
    width: 220px; height: 220px;
    background: repeating-linear-gradient(180deg, #FBCF4F 0 22px, #f4b183 22px 26px);
    clip-path: polygon(30% 0, 70% 0, 70% 6%, 82% 6%, 82% 12%, 88% 12%, 88% 18%, 94% 18%, 94% 30%, 100% 30%, 100% 70%, 94% 70%, 94% 82%, 88% 82%, 88% 88%, 82% 88%, 82% 94%, 70% 94%, 70% 100%, 30% 100%, 30% 94%, 18% 94%, 18% 88%, 12% 88%, 12% 82%, 6% 82%, 6% 70%, 0 70%, 0 30%, 6% 30%, 6% 18%, 12% 18%, 12% 12%, 18% 12%, 18% 6%, 30% 6%);
    filter: drop-shadow(0 0 60px rgba(251, 207, 79, 0.6));
}
.hills { left: 0; width: 200%; bottom: 0; background-repeat: repeat-x; background-position: 0 100%; image-rendering: pixelated; }
.hills.far { height: 240px; bottom: 14%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24' shape-rendering='crispEdges'%3E%3Cpath fill='%238c5966' d='M0 16h4v-2h4v-2h4v-2h8v2h4v2h4v2h6v-2h4v-3h6v2h4v3h12V24H0z'/%3E%3C/svg%3E"); background-size: 600px 240px; }
.hills.mid { height: 336px; bottom: 3%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24' shape-rendering='crispEdges'%3E%3Cpath fill='%23893f51' d='M0 16h4v-2h4v-2h4v-2h8v2h4v2h4v2h6v-2h4v-3h6v2h4v3h12V24H0z'/%3E%3C/svg%3E"); background-size: 840px 336px; background-position: 300px 100%; }
.hills.near { height: 480px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 24' shape-rendering='crispEdges'%3E%3Cpath fill='%234c252f' d='M0 16h4v-2h4v-2h4v-2h8v2h4v2h4v2h6v-2h4v-3h6v2h4v3h12V24H0z'/%3E%3C/svg%3E"); background-size: 1200px 480px; background-position: 700px 100%; bottom: -240px; }
.hay { width: 96px; height: 64px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' shape-rendering='crispEdges'%3E%3Cpath fill='%23e8b43a' d='M4 0h4v1H4zM2 1h8v1H2zM1 2h10v2H1zM0 4h12v4H0z'/%3E%3Cpath fill='%23c99a2e' d='M2 5h8v1H2zM1 7h10v1H1z'/%3E%3Cpath fill='%23FBCF4F' d='M4 1h3v1H4zM2 2h4v1H2z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; image-rendering: pixelated; }
.hay.h1 { left: 12%; bottom: 17%; }
.hay.h2 { left: 34%; bottom: 19%; width: 72px; height: 48px; }
.hay.h3 { right: 10%; bottom: 16%; width: 120px; height: 80px; }

/* 3 · burn lab: inside the barn */
.scene-barn { background: #31191f; }
.planks {
    inset: -10% 0;
    background:
        repeating-linear-gradient(90deg, #4c252f 0 76px, #3f1d26 76px 80px, #562a35 80px 156px, #2e151b 156px 160px),
        #4c252f;
}
.planks::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(180deg, transparent 0 236px, rgba(0, 0, 0, 0.25) 236px 240px);
}
.beam { left: 0; right: 0; height: 36px; background: #19161b; box-shadow: inset 0 -6px 0 #322528, 0 8px 0 rgba(0, 0, 0, 0.3); }
.beam.b1 { top: 10%; }
.beam.b2 { top: 58%; }
.lantern {
    top: 10%;
    width: 4px; height: 70px;
    margin-left: -2px;
    background: #19161b;
    transform-origin: 50% 0;
}
.lantern i {
    position: absolute;
    left: 50%; top: 70px;
    width: 28px; height: 36px;
    margin-left: -14px;
    background: #FBCF4F;
    box-shadow: inset 0 0 0 4px #19161b, inset 0 -8px 0 4px #19161b, 0 0 60px 30px rgba(251, 207, 79, 0.35);
}
.lantern.l1 { left: 5%; }
.lantern.l2 { left: 50%; height: 16px; }
.lantern.l2 i { top: 16px; }
.lantern.l3 { left: 95%; }
.hay-pile { bottom: -6px; width: 300px; height: 200px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' shape-rendering='crispEdges'%3E%3Cpath fill='%23e8b43a' d='M4 0h4v1H4zM2 1h8v1H2zM1 2h10v2H1zM0 4h12v4H0z'/%3E%3Cpath fill='%23c99a2e' d='M2 5h8v1H2zM1 7h10v1H1z'/%3E%3Cpath fill='%23FBCF4F' d='M4 1h3v1H4zM2 2h4v1H2z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; image-rendering: pixelated; opacity: 0.85; }
.hay-pile.left { left: -60px; }
.hay-pile.right { right: -80px; width: 360px; height: 240px; }

/* 4 · graveyard: the mud pen at dusk */
.scene-pen { background: linear-gradient(180deg, #1b191c 0%, #4c252f 45%, #893f51 70%, #8c5966 72%, #482e35 72%, #322528 100%); }
.fence { left: 0; width: 200%; background-repeat: repeat-x; image-rendering: pixelated; }
.fence.far { bottom: 27%; height: 96px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%236a2f3e' d='M2 1h2v1H2zM1 2h4v14H1zM10 1h2v1h-2zM9 2h4v14H9zM0 6h16v2H0zM0 11h16v2H0z'/%3E%3C/svg%3E"); background-size: 96px 96px; }
.fence.near { bottom: -20px; height: 240px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' shape-rendering='crispEdges'%3E%3Cpath fill='%2319161b' d='M2 1h2v1H2zM1 2h4v14H1zM10 1h2v1h-2zM9 2h4v14H9zM0 6h16v2H0zM0 11h16v2H0z'/%3E%3C/svg%3E"); background-size: 240px 240px; }
.mud {
    left: 0; right: 0; bottom: 0; height: 28%;
    background: conic-gradient(rgba(0, 0, 0, 0.18) 25%, transparent 0 50%, rgba(0, 0, 0, 0.18) 0 75%, transparent 0) 0 0 / 12px 12px;
}
.bubbles { left: 0; right: 0; bottom: 0; height: 28%; }
.bubbles i { position: absolute; width: 16px; height: 16px; background: #5f3d46; box-shadow: inset 4px 4px 0 #ba7284; transform: scale(0); }

/* 5 · collection: the farm at night */
.scene-night { background: linear-gradient(180deg, #19171a 0%, #3e232a 60%, #4c252f 100%); }
.night-stars { inset: 0 0 30% 0; }
.night-stars i { position: absolute; width: 3px; height: 3px; background: var(--bone); }
.night-moon {
    top: 7%; right: 3%;
    width: 90px; height: 90px;
    background: radial-gradient(circle at 34% 40%, #f9b0c2 0 9px, transparent 10px), radial-gradient(circle at 64% 62%, #f9b0c2 0 13px, transparent 14px), #FAEADD;
    clip-path: polygon(30% 0, 70% 0, 70% 6%, 82% 6%, 82% 12%, 88% 12%, 88% 18%, 94% 18%, 94% 30%, 100% 30%, 100% 70%, 94% 70%, 94% 82%, 88% 82%, 88% 88%, 82% 88%, 82% 94%, 70% 94%, 70% 100%, 30% 100%, 30% 94%, 18% 94%, 18% 88%, 12% 88%, 12% 82%, 6% 82%, 6% 70%, 0 70%, 0 30%, 6% 30%, 6% 18%, 12% 18%, 12% 12%, 18% 12%, 18% 6%, 30% 6%);
    filter: drop-shadow(0 0 50px rgba(250, 234, 221, 0.5));
}
.barn-sil { right: 6%; bottom: 12%; width: 360px; height: 288px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 32' shape-rendering='crispEdges'%3E%3Cpath fill='%2319161b' d='M18 0h4v2h-4zM14 2h12v2H14zM10 4h20v2H10zM6 6h28v2H6zM4 8h32v2H4zM6 10h28v22H6z'/%3E%3Cpath fill='%23FBCF4F' d='M17 13h6v4h-6zM9 20h4v3H9zM27 20h4v3h-4z'/%3E%3C/svg%3E") center / 100% 100% no-repeat; image-rendering: pixelated; }
.night-ground { left: 0; right: 0; bottom: 0; height: 13%; background: #19161b; box-shadow: 0 -4px 0 #322528; }
.fireflies { inset: 0; }
.fireflies i { position: absolute; width: 5px; height: 5px; background: #FBCF4F; box-shadow: 0 0 10px 3px rgba(251, 207, 79, 0.6); }

/* 6 · how to: the corn field before dawn */
.scene-crops { background: linear-gradient(180deg, #1b191c 0%, #4c252f 50%, #8c5966 85%, #d98d9f 100%); }
.corn { left: -5%; width: 210%; bottom: 0; background-repeat: repeat-x; background-position: 0 100%; image-rendering: pixelated; transform-origin: 50% 100%; }
.corn.far { height: 40%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 32' shape-rendering='crispEdges'%3E%3Cpath fill='%23893f51' d='M7 4h2v28H7zM6 0h1v4H6zM8 0h1v4H8zM9 1h1v3H9zM9 10h2v1H9zM11 9h2v1h-2zM13 8h1v1h-1zM3 16h4v1H3zM1 15h2v1H1zM0 14h1v1H0zM9 22h3v1H9zM12 21h2v1h-2z'/%3E%3C/svg%3E"); background-size: 90px 180px; }
.corn.mid { height: 30%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 32' shape-rendering='crispEdges'%3E%3Cpath fill='%236a2f3e' d='M7 4h2v28H7zM6 0h1v4H6zM8 0h1v4H8zM9 1h1v3H9zM9 10h2v1H9zM11 9h2v1h-2zM13 8h1v1h-1zM3 16h4v1H3zM1 15h2v1H1zM0 14h1v1H0zM9 22h3v1H9zM12 21h2v1h-2z'/%3E%3C/svg%3E"); background-size: 120px 240px; background-position: 40px 100%; }
.corn.near { height: 44%; bottom: -12%; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 32' shape-rendering='crispEdges'%3E%3Cpath fill='%234c252f' d='M7 4h2v28H7zM6 0h1v4H6zM8 0h1v4H8zM9 1h1v3H9zM9 10h2v1H9zM11 9h2v1h-2zM13 8h1v1h-1zM3 16h4v1H3zM1 15h2v1H1zM0 14h1v1H0zM9 22h3v1H9zM12 21h2v1h-2z'/%3E%3C/svg%3E"); background-size: 190px 380px; background-position: 90px 100%; }

/* 7 · tokenomics + join: sunrise over the farm */
.scene-sunrise { background: linear-gradient(180deg, #3e232a 0%, #6a2f3e 35%, #a46c7a 60%, #e79aa4 78%, #f4b183 90%, #FBCF4F 100%); }
.rise-sun {
    left: 50%; bottom: -120px;
    width: 300px; height: 300px;
    margin-left: -150px;
    background: repeating-linear-gradient(180deg, #FBCF4F 0 26px, #fde8ad 26px 30px);
    clip-path: polygon(30% 0, 70% 0, 70% 6%, 82% 6%, 82% 12%, 88% 12%, 88% 18%, 94% 18%, 94% 30%, 100% 30%, 100% 70%, 94% 70%, 94% 82%, 88% 82%, 88% 88%, 82% 88%, 82% 94%, 70% 94%, 70% 100%, 30% 100%, 30% 94%, 18% 94%, 18% 88%, 12% 88%, 12% 82%, 6% 82%, 6% 70%, 0 70%, 0 30%, 6% 30%, 6% 18%, 12% 18%, 12% 12%, 18% 12%, 18% 6%, 30% 6%);
    filter: drop-shadow(0 0 80px rgba(251, 207, 79, 0.7));
}
.cloud.c4 { top: 20%; left: 10%; opacity: 0.7; }
.cloud.c5 { top: 36%; left: 70%; width: 200px; height: 66px; opacity: 0.6; }
.world-embers { inset: 0; }
.world-embers i { position: absolute; bottom: -12px; width: 6px; height: 6px; background: var(--flame); }

/* straws, petals and sparkles drifting through every scene */
.world-debris { position: absolute; left: 0; right: 0; top: 0; height: 400vh; will-change: transform; }
.world-debris i { position: absolute; background: center / 100% 100% no-repeat; image-rendering: pixelated; }
.world-debris.far { opacity: 0.35; }
.world-debris.near { opacity: 0.6; }
.world-debris .straw { width: 40px; height: 12px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 3' shape-rendering='crispEdges'%3E%3Cpath fill='%23e8b43a' d='M0 2h3v1H0zM3 1h4v1H3zM7 0h3v1H7z'/%3E%3C/svg%3E"); }
.world-debris .petal { width: 20px; height: 20px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 5' shape-rendering='crispEdges'%3E%3Cpath fill='%23F29CB7' d='M2 0h1v1H2zM0 2h1v1H0zM4 2h1v1H4zM2 4h1v1H2zM1 1h3v3H1z'/%3E%3Cpath fill='%23FBCF4F' d='M2 2h1v1H2z'/%3E%3C/svg%3E"); }
.world-debris .spark { width: 20px; height: 20px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 5' shape-rendering='crispEdges'%3E%3Cpath fill='%23FBCF4F' d='M2 0h1v1H2zM1 1h3v3H1zM0 2h5v1H0zM2 4h1v1H2z'/%3E%3Cpath fill='%23ffffff' d='M2 2h1v1H2z'/%3E%3C/svg%3E"); }

/* the wipe between scenes */
.world-wipe { position: absolute; inset: 0; display: grid; z-index: 5; }
.world-wipe i { background: var(--wine); transform: scale(0); }
.world-wipe i.alt { background: #4c252f; }
.world-wipe i.hot { background: var(--berry-hi); }
.world-wipe i.sun { background: var(--sprout); }

@media (max-width: 900px) {
    .cloud { width: 140px; height: 46px; }
    .sunset-sun { width: 140px; height: 140px; left: 50%; }
    .barn-sil { width: 200px; height: 160px; }
    .night-moon { width: 70px; height: 70px; }
    .hay-pile { width: 180px; height: 120px; }
    .hay-pile.right { width: 200px; height: 134px; }
    .rise-sun { width: 200px; height: 200px; margin-left: -100px; }
}


/* adopt: mystery crate or pick a pig */
.mode-opt { flex: 1; padding: 8px 6px 10px; border: 0; background: var(--white); font-family: var(--f-display); font-size: 22px; cursor: pointer; }
.mode-opt.active { background: var(--rose); }
.crate-stack.picked img:nth-child(1), .crate-stack.picked img:nth-child(2) { opacity: 0; }
.crate-stack.picked img:nth-child(3) { left: 30px; top: 30px; background: var(--pick-bg, var(--white)); }
.look-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 10px; margin: 0 0 20px; max-height: 330px; overflow-y: auto; padding: 4px; }
.look-opt { position: relative; display: grid; gap: 2px; padding: 6px 4px 6px; border: 0; background: var(--white); box-shadow: var(--outline); cursor: pointer; font: inherit; text-align: center; }
.look-opt img { width: 100%; aspect-ratio: 1; object-fit: contain; image-rendering: pixelated; }
.look-opt b { font-family: var(--f-display); font-size: 17px; line-height: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.look-opt small { font-family: var(--f-label); font-size: 10px; }
.look-opt:hover { transform: translateY(-2px); }
.look-opt.active { background: var(--sun); outline: 3px solid var(--char); outline-offset: 2px; }
.look-opt.gone { opacity: .4; cursor: not-allowed; }
.look-opt.gone small { color: #b3261e; }
