/* spudnote.com/garden: the cast. The site's chrome (field, header, footer, back to top, night
 * garden) comes from /site/site.css; this file is the page's own content, in both themes.
 * Mobile first: one column, then two, then the wide grid. */

:root {
  --cream: #FFFAF1;
  --card: rgba(255, 253, 248, 0.78);
  --card-solid: #FFFDF8;
  --cream-deep: #FDEEDA;
  --ink: #2A1408;
  --ink-dim: #6E4A2E;
  --ink-faint: #8A6A4E;
  --line: rgba(90, 52, 12, 0.14);
  --brand: #9A5518;
  --sprout: #2E7018;
  --chip-on: #2E7018;
  --chip-on-ink: #FFFDF8;
  --shadow: 0 18px 40px -22px rgba(90, 52, 12, 0.32);
  --fred: 'Fredoka', ui-rounded, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
:root[data-theme="dark"] {
  --cream: #21263C;
  --card: rgba(46, 52, 82, 0.74);
  --card-solid: #2E3452;
  --cream-deep: #333852;
  --ink: #F2EEFF;
  --ink-dim: #B0AACC;
  --ink-faint: #9893B8;
  --line: rgba(176, 170, 204, 0.24);
  --brand: #F0B968;
  --sprout: #7FC44C;
  --chip-on: #7FC44C;
  --chip-on-ink: #1A1F33;
  --shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.7);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; min-height: 100dvh; display: flex; flex-direction: column;
  color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 clamp(20px, 5vw, 36px); }

.eyebrow {
  font-family: var(--fred); font-size: .78rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand); margin: 0 0 10px;
}
h1, h2, h3 { font-family: var(--fred); font-weight: 500; margin: 0; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 7vw, 3.1rem); line-height: 1.12; }
h2 { font-size: clamp(1.44rem, 4.2vw, 2.05rem); line-height: 1.24; }
.lede { color: var(--ink-dim); margin: 12px auto 0; max-width: 44ch; font-size: clamp(1rem, 2.4vw, 1.08rem); }
section { padding: clamp(40px, 7vh, 72px) 0 0; }
.head { text-align: center; margin-bottom: clamp(22px, 4vw, 34px); }

/* ---------- hero ---------- */
.hero { text-align: center; padding-top: clamp(40px, 8vh, 72px); }

/* ---------- the locals: Spud and Gary ---------- */
/* The pair, side by side and close, like they hang out in the app's field (Lukas, 2026-11-05: no
   cards, not far apart). Each name sits on a cream capsule like a note's label in the field
   (PlantedSprout's marker: cream fill, hairline, a soft soil shadow); their lines run in two short
   columns under them. Spud's bubble hangs over the pair, placed by garden.js so it never leaves the screen. */
.locals {
  position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: start;
  column-gap: clamp(6px, 2.4vw, 22px); max-width: 500px; margin: 0 auto; padding-top: 24px;
}
.card { text-align: center; min-width: 0; }
.card h3 {
  display: inline-block; margin: 10px 0 0; padding: 5px 13px; border-radius: 999px;
  font-family: var(--fred); font-weight: 500; font-size: .92rem; line-height: 1.2; color: var(--ink);
  background: var(--label-bg, #FFF2DF); border: 1px solid var(--line);
  box-shadow: 0 2px 5px rgba(201, 172, 126, 0.3);
}
:root[data-theme="dark"] .card h3 { --label-bg: #21263C; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35); }
.card p { color: var(--ink-dim); margin: 10px auto 0; max-width: 24ch; font-size: clamp(.84rem, 2.5vw, .96rem); line-height: 1.5; }
.stage { position: relative; height: clamp(130px, 33vw, 176px); display: flex; align-items: flex-end; justify-content: center; }
/* Spud: the landing page's three layers, float, blink and bounce */
.spud-btn {
  appearance: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; background: none; border: 0; padding: 0; margin: 0 0 6px;
  cursor: pointer; line-height: 0; display: block; border-radius: 999px;
}
.spud-btn:focus-visible { outline: none; }
.spud-btn:focus-visible .spud { filter: drop-shadow(0 0 2px var(--brand)) drop-shadow(0 0 12px var(--brand)); }
.spud-btn .spud {
  display: block; position: relative; width: clamp(84px, 24vw, 112px);
  filter: drop-shadow(0 14px 18px rgba(90, 52, 12, 0.24));
  animation: float 5.5s ease-in-out infinite; transform-origin: 50% 90%;
}
:root[data-theme="dark"] .spud-btn .spud { filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.45)); }
/* Spud is the app's rig since 2026-11-12, as on the landing page (tools/spud-looks): one frame per look and eye,
   placed over the old 350:420 box; a tap tries on a new look (/assets/spud-look-3.js) */
.spud-btn .spud { aspect-ratio: 350 / 420; }
.spud-btn .spud .spud-look { position: absolute; left: -4.475%; top: -15.092%; width: 108.857%; height: auto; max-width: none; display: block; }
.spud-btn.boing { animation: mascot-boing 460ms cubic-bezier(.28, 1.36, .44, 1); transform-origin: 50% 88%; }
.gary-btn.boing { animation: mascot-boing 460ms cubic-bezier(.28, 1.36, .44, 1); transform-origin: 50% 88%; }   /* a tap: his season changes */
@keyframes mascot-boing {
  0% { transform: scale(1, 1); } 20% { transform: scale(1.15, .85); } 44% { transform: scale(.91, 1.11); }
  66% { transform: scale(1.06, .95); } 84% { transform: scale(.98, 1.02); } 100% { transform: scale(1, 1); }
}
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(-10px) rotate(1.2deg); } }
.bubble {
  text-align: center;   /* his lines centered, as on the landing page (Lukas, 2026-11-12) */
  position: absolute; left: 0; top: 0; box-sizing: border-box;
  /* the app's bubble: in from 85% at its tail on a soft spring, out over 0.3s (/assets/spud-bubble-2.js) */
  scale: 0.85; transform-origin: var(--tail, 50%) 100%;
  width: max-content; max-width: min(100%, 300px);
  background: var(--card-solid); color: var(--ink);
  font-family: var(--fred); font-weight: 500; font-size: .92rem; line-height: 1.4;
  padding: 9px 14px; border-radius: 14px; border: 1px solid var(--line);
  box-shadow: 0 12px 26px -12px rgba(90, 52, 12, 0.35);
  opacity: 0; pointer-events: none; transition: opacity .3s ease-out, scale .3s ease-out; z-index: 3;
}
.bubble::after {
  content: ""; position: absolute; top: 100%; left: var(--tail, 50%); transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: var(--card-solid);
}
.bubble.show { opacity: 1; scale: 1; transition: opacity .2s ease-out, scale .34s cubic-bezier(.3, 1.45, .5, 1); }
.bubble.snap { transition: none; }
.bubble.ghost { transition: opacity .16s ease-out, scale .16s ease-out; z-index: 2; }   /* the line being replaced */
@media (prefers-reduced-motion: reduce) { .bubble, .bubble.show { scale: 1; transition: opacity .2s ease-out; } }

/* Gary: drawn live by /gary.js on a canvas, like the app's */
.gary-btn { appearance: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; line-height: 0; border-radius: 18px; display: block; width: min(100%, 220px); }
.gary-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
.gary-canvas { -webkit-touch-callout: none; width: 100%; height: auto; display: block; }

/* ---------- the crops + the shed ---------- */
.shed { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0 auto clamp(18px, 3vw, 26px); max-width: 860px; }
.shuffle {
  appearance: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--chip-on); background: var(--chip-on); color: var(--chip-on-ink);
  font-family: var(--fred); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 11px 18px 11px 15px; border-radius: 999px; cursor: pointer;
  transition: filter .16s ease, transform .16s ease;
}
.shuffle:hover { filter: brightness(1.08); }
.shuffle:focus-visible { outline: 2px solid var(--sprout); outline-offset: 3px; }
.shuffle:active { transform: scale(.96); }
.shuffle-ico { display: block; transition: transform .4s cubic-bezier(.3, 1.4, .5, 1); }
.shuffle.spun .shuffle-ico { transform: rotate(180deg); }

/* Tiny dressed crops held up by their sprouts, dangling: no cards, just a name over each.
   The name sits ON TOP on purpose: every crop hangs from the same point, so the names line up and
   never move, while the bottoms swing and change with the outfit (a vampire cape hangs ~11% lower).
   Four across on every screen. Each swings gently from its leaves (the pivot tools/garden-art
   prints: 50% 15.4%), out of step with the others; a tap swings it hard (.kick) while its face
   runs the app's pull reaction (garden.js). */
.crops {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(26px, 5vw, 40px) 6px;
  max-width: 760px; margin: 0 auto;
}
.crop { text-align: center; min-width: 0; }
/* a hard swing at the screen's edge must never make the page scroll sideways */
section[aria-labelledby="crops-h"] { overflow-x: clip; }
.crop h3 {
  font-family: var(--fred); font-weight: 600; font-size: clamp(.82rem, 2.6vw, 1.02rem);
  color: var(--ink); margin: 0 0 2px; line-height: 1.2;
}
.crop-btn {
  appearance: none; -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none; background: none; border: 0; padding: 0; cursor: pointer;
  width: 100%; line-height: 0; border-radius: 14px; display: block;
}
.crop-btn:focus-visible { outline: 2px solid var(--sprout); outline-offset: 2px; }
.crop-swing, .crop-kick { display: block; transform-origin: 50% 15.4%; }
.crop-swing { animation: dangle var(--d, 3s) ease-in-out var(--p, 0s) infinite alternate; }
@keyframes dangle { from { transform: rotate(calc(var(--a, 3.5deg) * -1)); } to { transform: rotate(var(--a, 3.5deg)); } }
.crop-btn.kick .crop-kick { animation: kick 1.7s cubic-bezier(.3, .1, .3, 1); }
@keyframes kick {
  0% { transform: rotate(0); } 12% { transform: rotate(16deg); } 30% { transform: rotate(-12deg); }
  48% { transform: rotate(8deg); } 64% { transform: rotate(-5deg); } 80% { transform: rotate(2.5deg); }
  100% { transform: rotate(0); }
}
/* every frame shares one canvas (tools/garden-art/export.sh), so swapping never moves the crop */
/* each crop's sprout in one of the app's eight SproutTint colours (2026-11-12): the stalk + roots behind the veg,
   the leaves over it, one small layer per colour (tools/garden-art); "surprise" deals new colours with the outfits */
.tint-stack { display: block; position: relative; width: min(100%, 150px); margin: 0 auto; }
.tint-stack .sp { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.crop-art { width: 100%; height: auto; aspect-ratio: 300 / 390; margin: 0 auto; display: block; position: relative; }

/* ---------- the shorts ---------- */
.follow { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
.net-ico {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  transition: border-color .16s ease, color .16s ease, transform .16s ease;
}
.net-ico svg { display: block; }
.net-ico:hover { border-color: var(--sprout); color: var(--sprout); transform: translateY(-1px); }
.net-ico:focus-visible { outline: 2px solid var(--sprout); outline-offset: 2px; }
/* the two lists, one at a time (a segmented toggle, like the app's) */
.sort {
  display: flex; width: max-content; max-width: 100%; margin: clamp(22px, 4vw, 30px) auto 16px; padding: 4px; gap: 4px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--card);
}
.sort-btn {
  appearance: none; -webkit-tap-highlight-color: transparent; border: 0; background: none; cursor: pointer;
  font-family: var(--fred); font-weight: 600; font-size: .95rem; line-height: 1; color: var(--ink-dim);
  padding: 10px 16px; border-radius: 999px; transition: background .16s ease, color .16s ease;
}
.sort-btn:hover { color: var(--ink); }
.sort-btn[aria-pressed="true"] { background: var(--chip-on); color: var(--chip-on-ink); }
.sort-btn:focus-visible { outline: 2px solid var(--sprout); outline-offset: 2px; }
.shorts { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) { .shorts { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }
/* every eligible short is in the HTML so garden.js can sort them either way; 8 show */
.shorts .short:nth-child(n+9) { display: none; }
.short {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
}
.short a.thumb { display: block; position: relative; aspect-ratio: 9 / 16; background: var(--cream-deep); }
/* the view count on the thumbnail, Instagram style: a play mark + the number, white on a soft fade */
.short .views {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 8px 9px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  background: linear-gradient(to top, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0));
  color: #fff; font-family: var(--fred); font-weight: 600; font-size: .9rem; line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .35); pointer-events: none;
}
.short .views svg { width: 13px; height: 13px; display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.short .views:empty, .short .views[data-views=""] { display: none; }
.short a.thumb img { width: 100%; height: 100%; object-fit: cover; }
.short .meta { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.short .title { font-family: var(--fred); font-weight: 500; font-size: .92rem; line-height: 1.3; margin: 0; color: var(--ink); }
.short .stat { font-family: var(--fred); font-weight: 500; font-size: .8rem; color: var(--ink-faint); margin: -2px 0 0; }
.short .stat:empty { display: none; }
.short .nets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.short .nets a {
  text-decoration: none; font-family: var(--fred); font-weight: 500; font-size: .78rem; color: var(--ink-dim);
  padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line);
}
.short .nets a:hover { color: var(--sprout); border-color: var(--sprout); }
.short .nets a:focus-visible { outline: 2px solid var(--sprout); outline-offset: 2px; }

/* ---------- close ---------- */
.close { text-align: center; padding-bottom: clamp(48px, 9vh, 88px); }
.appstore { display: inline-block; margin-top: 22px; line-height: 0; transition: transform .18s ease, opacity .18s ease; }
.appstore:hover { transform: translateY(-2px); opacity: .92; }
.appstore img { height: 44px; width: auto; filter: drop-shadow(0 6px 14px rgba(90, 52, 12, 0.18)); }
:root[data-theme="dark"] .appstore img { filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.45)); }

@media (prefers-reduced-motion: reduce) {
  .spud-btn .spud { animation: none; }
  .spud-btn.boing, .gary-btn.boing, .crop-swing, .crop-btn.kick .crop-kick { animation: none; }
  .shuffle, .shuffle-ico, .net-ico, .sort-btn, .appstore { transition: none; }
}

/* the visitors (2026-11-12): four tiles of the app's creatures, each on its theme's ground, a 16-frame strip
   stepped by garden.js (background-position), still under reduced motion */
.visitors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 3vw, 28px); max-width: 760px; margin: 0 auto; }
.visitor { margin: 0; text-align: center; }
.vis-tile { display: block; width: min(100%, 150px); aspect-ratio: 1; margin: 0 auto; border-radius: 22px;
  background-repeat: no-repeat; background-size: 1600% 100%; background-position: 0 0;
  box-shadow: 0 14px 26px -14px rgba(90, 52, 12, 0.35); }
:root[data-theme="dark"] .vis-tile { box-shadow: 0 14px 26px -14px rgba(0, 0, 0, 0.6); }
.visitor h3 { margin: 12px 0 4px; font-size: 0.98rem; }
.visitor p { margin: 0 auto; max-width: 18ch; font-size: 0.86rem; color: var(--ink-dim); line-height: 1.4; }
@media (max-width: 620px) { .visitors { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; } }
/* crop sounds: on by default, a tap on a crop plays its cry (/assets/cry-1.js); this mutes them, remembered */
.sound-toggle { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; padding: 7px 13px 7px 11px; border-radius: 999px;
  border: 1px solid rgba(90, 52, 12, 0.16); background: rgba(255, 253, 248, 0.7); color: var(--ink-dim);
  font-family: var(--fred); font-size: 0.86rem; font-weight: 500; cursor: pointer; vertical-align: middle; }
.sound-toggle .snd-off, .sound-toggle[aria-pressed="false"] .snd-on { display: none; }
.sound-toggle[aria-pressed="false"] .snd-off { display: inline; }
.sound-toggle[aria-pressed="false"] { opacity: 0.7; }
:root[data-theme="dark"] .sound-toggle { background: rgba(46, 52, 82, 0.7); border-color: rgba(176, 170, 204, 0.2); }
