/* =========================================================
   Useful Garden — inner pages (Explore, About, 404)
   Loaded after home.css, which provides the sky, lawn and plot.
   ========================================================= */

/* ---------- a shorter sky ---------- */
.sky--page { padding-top: calc(68px + clamp(14px, 4vh, 44px)); }
.sky--page h1 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); }
.sky--page .sky-lede { margin-bottom: 22px; }
.sky--page .hills { height: clamp(80px, 10vw, 150px); }
.sky--page .celestial { --size: 64px; --peak: 80px; --drop: 110px; }
.sky--page .celestial .moon { box-shadow: inset -13px 7px 0 0 var(--moon), 0 0 40px 2px rgba(243, 236, 212, .12); }
.sky-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.sky-actions .btn-ghost { background: color-mix(in srgb, var(--surface) 70%, transparent); }

/* ---------- the plot on the lawn ---------- */
.plot--page {
  margin-top: clamp(-110px, -7vw, -40px);
  padding: clamp(34px, 3.6vw, 52px) clamp(18px, 4.5vw, 64px) clamp(44px, 5vw, 72px);
}
.plot-title {
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
  font-size: clamp(1.45rem, 2.6vw, 2rem); text-align: center; margin: 0 0 40px;
}
.plot-title .icon { width: 24px; height: 24px; color: var(--brand-ink); }

/* ---------- explore: filters ---------- */
.lawn .filters { display: grid; gap: 12px; margin-bottom: 22px; }
.lawn .filter-label { min-width: 58px; }
.chip[class*="tint-"][aria-pressed="true"] { background: var(--tint-ink); border-color: var(--tint-ink); color: var(--tint-bg); }
.chip[class*="tint-"][aria-pressed="true"] .swatch { background: var(--tint-bg); }
.lawn .results-bar { color: var(--ink-2); margin-bottom: 20px; }

/* ---------- explore: seed packets ---------- */
.packets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(290px, 100%), 1fr)); gap: 30px 24px; }
.seed-packet {
  --r: -.6deg;
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink);
  border-radius: 20px 20px 20px 8px;
  box-shadow: var(--shadow), 0 0 0 1px var(--line);
  transform: rotate(var(--r));
  transition: transform .3s cubic-bezier(.3, 1.4, .5, 1), box-shadow .3s;
}
.seed-packet:nth-child(even) { --r: .5deg; }
.seed-packet:nth-child(3n) { --r: -.2deg; }
.seed-packet:not(.seed-packet--seed):hover { transform: translateY(-5px) rotate(0); box-shadow: var(--shadow-lg), 0 0 0 1px color-mix(in srgb, var(--tint-ink) 35%, var(--line)); }
.seed-packet:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }

.sp-band {
  position: relative; display: flex; align-items: flex-start; gap: 10px;
  min-height: 124px; padding: 14px; overflow: hidden;
  border-radius: 20px 20px 0 0;
  background: radial-gradient(circle, color-mix(in srgb, var(--tint-ink) 14%, transparent) 1.2px, transparent 1.6px) 0 0 / 12px 12px, var(--tint-bg);
  color: var(--tint-ink);
  border-bottom: 2px dashed color-mix(in srgb, var(--tint-ink) 25%, transparent);
}
.sp-band .packet-section { margin-top: 9px; max-width: 55%; line-height: 1.35; }
.sp-band::after {
  content: ""; position: absolute; right: 8px; bottom: -8px; width: 104px; height: 20px; border-radius: 50%;
  background: color-mix(in srgb, var(--tint-ink) 28%, var(--tint-bg));
}
.sp-plant { position: absolute; z-index: 1; right: 26px; bottom: 2px; display: block; }
.sp-plant .plant-sway, .sp-plant .plant-grow { display: block; transform-origin: 50% 100%; }
.sp-plant .plant-svg--bloom { width: 58px; height: 100px; }
.sp-plant .plant-svg--sprout { width: 66px; height: 66px; }
.sp-plant .plant-svg--seed { width: 64px; height: 28px; }
.sp-plant .stem, .sp-plant .shoot { stroke: var(--tint-ink); }
.sp-plant .leaf { fill: var(--tint-ink); }
.sp-plant .leaf--l { opacity: .72; }
.sp-plant .mound { fill: color-mix(in srgb, var(--tint-ink) 45%, var(--tint-bg)); }
.seed-packet:not(.seed-packet--seed):hover .sp-plant { animation: wiggle .7s ease-in-out; transform-origin: 50% 100%; }

/* the plant grows when its packet scrolls into view */
.js .seed-packet:not(.is-in) .plant-grow { transform: scale(.3, 0); }
.js .seed-packet:not(.is-in) .sp-plant .leaf,
.js .seed-packet:not(.is-in) .sp-plant .flower-head { transform: scale(0); }
.seed-packet.is-in .plant-grow { animation: grow-up 1.1s cubic-bezier(.2, .9, .3, 1.15) var(--delay, 0ms) both; }
.seed-packet.is-in .sp-plant .leaf { animation: unfurl .7s cubic-bezier(.3, 1.3, .5, 1) calc(var(--delay, 0ms) + 380ms + var(--i, 0) * 130ms) both; }
.seed-packet.is-in .sp-plant .flower-head { animation: bloom-open .9s cubic-bezier(.3, 1.5, .5, 1) calc(var(--delay, 0ms) + 900ms) both; }

.sp-body { display: flex; flex-direction: column; flex: 1; padding: 16px 20px 18px; }
.sp-title { font-size: 1.3rem; margin: 0 0 6px; }
.sp-title a { color: var(--ink); text-decoration: none; }
.sp-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.sp-title a:focus-visible { outline: none; }
.sp-body p { color: var(--ink-2); font-size: .95rem; margin: 0 0 16px; }
.sp-meta { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding-top: 14px; border-top: 1px dashed var(--line); }
.sp-go { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--brand-ink); }
.sp-go .icon { width: 16px; height: 16px; transition: transform .2s; }
.seed-packet:hover .sp-go .icon { transform: translateX(3px); }
.sp-go--soon { color: var(--ink-3); font-weight: 500; }

.seed-packet--seed { background: color-mix(in srgb, var(--surface) 55%, transparent); box-shadow: 0 0 0 1.5px var(--line-strong); }
.seed-packet--seed .sp-band { background: transparent; }
.seed-packet--seed .sp-title { color: var(--ink-2); }

/* nothing matches: an empty bed */
.empty-bed {
  text-align: center; padding: 38px 20px 34px; color: var(--ink-2);
  background: var(--tint-bg); border: 1.5px dashed color-mix(in srgb, var(--tint-ink) 35%, transparent); border-radius: 28px;
}
.empty-bed h3 { font-size: 1.3rem; color: var(--ink); }
.empty-bed p { margin: 0; }
.empty-bed-mound { display: block; }
.empty-bed-mound svg { width: 96px; height: auto; margin: 0 auto 12px; overflow: visible; }
.empty-bed .mound { fill: color-mix(in srgb, var(--tint-ink) 45%, var(--tint-bg)); }
.empty-bed .shoot { stroke: var(--tint-ink); }

/* ---------- about: signboard ---------- */
.sign { position: relative; max-width: 780px; margin: 0 auto 70px; padding-bottom: 48px; }
.sign-board {
  position: relative; z-index: 1; max-width: none;
  background: var(--surface); border-radius: 18px;
  padding: clamp(22px, 3.4vw, 36px);
  box-shadow: 0 0 0 7px var(--wood-light), 0 0 0 8px var(--wood-dark), var(--shadow-lg);
}
.sign-board p:last-child { margin-bottom: 0; }
.sign-post { position: absolute; bottom: 0; left: 20%; width: 16px; height: 80px; background: var(--wood); border-radius: 4px 4px 2px 2px; box-shadow: inset -4px 0 0 var(--wood-dark); }
.sign-post + .sign-post { left: auto; right: 20%; }

/* ---------- about: four little beds ---------- */
.principle-beds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 20px; }
@media (max-width: 1000px) { .principle-beds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .principle-beds { grid-template-columns: 1fr; } }
.principle-beds .principle-bed { grid-column: auto; margin-top: 0; padding: 16px 18px 22px; }
.principle-row {
  display: flex; align-items: flex-end; justify-content: space-around;
  height: 124px; margin: 0 -4px 16px; padding-bottom: 4px;
  border-bottom: 2px dotted color-mix(in srgb, var(--tint-ink) 30%, transparent);
}
.principle-plant { cursor: default; }
.principle-plant .plant-svg--bloom { width: 64px; height: 110px; }
.principle-text h3 { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin: 0 0 6px; }
.principle-bed .icon-tile { width: 36px; height: 36px; background: var(--surface); }
.principle-bed .icon-tile .icon { width: 19px; height: 19px; }
.principle-text p { color: var(--ink-2); font-size: .95rem; margin: 0; }

.board-intro { color: var(--ink-2); font-size: .95rem; margin-bottom: 18px; }

/* ---------- 404: an empty bed with a stake ---------- */
.plot--lost { text-align: center; }
.lost-bed { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 22px; width: min(300px, 100%); height: 140px; margin: 0 auto 40px; }
.lost-bed::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 46px; border-radius: 50%; background: color-mix(in srgb, var(--soil) 35%, var(--plot)); }
.lost-bed .empty-bed-mound { position: relative; z-index: 1; margin-bottom: 14px; }
.lost-bed .empty-bed-mound svg { margin: 0; }
.lost-stake {
  position: relative; z-index: 1; margin-bottom: 62px;
  font: 600 1.1rem var(--font-display); color: var(--ink);
  background: var(--surface); border: 2px solid var(--wood); border-radius: 8px; padding: 4px 14px;
  transform: rotate(-6deg); transform-origin: 50% 100%;
  animation: stake-lean 5s ease-in-out infinite;
}
.lost-stake::after { content: ""; position: absolute; z-index: -1; left: 50%; top: 100%; width: 8px; height: 54px; margin-left: -4px; background: var(--wood); border-radius: 0 0 2px 2px; }
@keyframes stake-lean { 50% { transform: rotate(-2deg); } }

.bed-signs { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px 18px; }
.bed-signs .bed-tag { position: relative; top: auto; left: auto; right: auto; max-width: 320px; text-align: left; }
.bed-signs .bed-tag:nth-child(even) { animation-delay: -3.5s; }
.bed-signs .bed-tag:nth-child(3n) { animation-delay: -1.8s; }

@media (max-width: 620px) {
  /* filters swipe sideways instead of stacking a screen tall */
  .lawn .filter-row {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin: 0 calc(-1 * clamp(18px, 4.5vw, 64px)); padding: 2px clamp(18px, 4.5vw, 64px);
  }
  .lawn .filter-row::-webkit-scrollbar { display: none; }
  .lawn .filter-row .chip { flex: none; }
}

@media (max-width: 720px) {
  .sky--page { padding-top: calc(68px + 60px); }
  .sky--page .celestial { --size: 50px; --peak: 74px; --drop: 30px; }
  .sky--page .celestial .moon { box-shadow: inset -11px 6px 0 0 var(--moon); }
  .sign-post { left: 14%; }
  .sign-post + .sign-post { right: 14%; }
}

@media (max-width: 620px) { .bed-signs .bed-tag { max-width: none; width: 100%; } }

/* =========================================================
   Suggest an idea
   ========================================================= */
.idea-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
@media (max-width: 860px) { .idea-layout { grid-template-columns: 1fr; } }

.idea-packet {
  position: relative; background: var(--surface); color: var(--ink);
  border-radius: 22px 22px 22px 8px; box-shadow: var(--shadow-lg), 0 0 0 1px var(--line);
}
.idea-band { min-height: 96px; border-radius: 22px 22px 0 0; }
.idea-band .sp-plant .plant-svg--sprout { width: 70px; height: 70px; }

.idea-form { padding: clamp(18px, 3vw, 28px); }
.idea-form .field { margin-bottom: 20px; }
.idea-form fieldset { border: 0; padding: 0; min-width: 0; }
.idea-form legend { padding: 0; margin-bottom: 8px; }
.idea-form label, .idea-form .label { font-size: .95rem; color: var(--ink); }
.idea-form textarea { min-height: 132px; resize: vertical; font-size: 1.02rem; line-height: 1.6; }
.idea-form input::placeholder, .idea-form textarea::placeholder { color: var(--ink-3); }
.idea-form [aria-invalid="true"] { border-color: #c2553a; box-shadow: 0 0 0 4px rgba(194, 85, 58, .14); }
.optional { font-size: .78rem; font-weight: 500; color: var(--ink-3); margin-left: 6px; }
.idea-under { display: flex; justify-content: space-between; gap: 12px; min-height: 1.3em; }
.idea-under .hint { margin-left: auto; font-variant-numeric: tabular-nums; }
.idea-under .hint.is-near { color: var(--accent); }
.field-error { font-size: .85rem; font-weight: 500; color: #b4452b; }
.field-error:empty { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .field-error { color: #f0a58c; } }
:root[data-theme="dark"] .field-error { color: #f0a58c; }
.idea-reply .field-row { margin-bottom: 6px; }
.idea-reply .hint { display: block; }

.idea-about { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; padding: 6px 12px; border-radius: 999px; background: var(--tint-bg); color: var(--tint-ink); font-size: .9rem; }
.idea-about .icon { width: 17px; height: 17px; }

/* kind: radio buttons that look like chips */
.idea-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.idea-chips .chip { position: relative; font-size: .9rem; }
.idea-chips .chip input { position: absolute; opacity: 0; pointer-events: none; }
.idea-chips .chip:has(input:checked) { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.idea-chips .chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* the honeypot: off-screen for people, still in the form for bots */
.idea-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.idea-status { margin: 0 0 14px; font-size: .92rem; font-weight: 500; color: #b4452b; }
.idea-status:empty { display: none; }
.idea-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.idea-actions .btn { padding: 14px 24px; font-size: 1rem; }
.idea-actions .btn.is-busy { opacity: .75; cursor: progress; }
.idea-actions .btn.is-busy .icon { animation: fly .9s ease-in-out infinite; }
@keyframes fly { 50% { transform: translate(3px, -3px) rotate(-8deg); } }
.idea-shortcut { font-size: .82rem; color: var(--ink-3); }
.idea-shortcut kbd { font: 500 .75rem var(--font-body); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 6px; }
@media (hover: none) { .idea-shortcut { display: none; } }

/* sent */
.idea-thanks { padding: clamp(28px, 4vw, 44px) clamp(18px, 3vw, 28px); text-align: center; outline: none; }
.idea-thanks h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin-bottom: 8px; }
.idea-thanks p { color: var(--ink-2); max-width: 44ch; margin: 0 auto 22px; }
.idea-thanks-plant { display: block; position: relative; width: 120px; margin: 0 auto 14px; }
.idea-thanks-plant::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -6px; height: 16px; border-radius: 50%; background: var(--moss-bg); z-index: -1; }
.idea-thanks-plant svg { width: 120px; height: 120px; margin: 0 auto; transform-origin: 50% 100%; }
.idea-thanks-plant .stem { stroke: var(--moss-ink); }
.idea-thanks-plant .leaf { fill: var(--moss-ink); }
.idea-thanks-plant .leaf--l { opacity: .72; }
.idea-thanks:not([hidden]) .idea-thanks-plant svg { animation: grow-up 1s cubic-bezier(.2, .9, .3, 1.15) .1s both; }
.idea-thanks:not([hidden]) .idea-thanks-plant .leaf { animation: unfurl .7s cubic-bezier(.3, 1.3, .5, 1) calc(.5s + var(--i, 0) * .15s) both; }

/* side: the mailbox raises its flag when an idea is sent */
.idea-side { padding: 8px 4px; }
.idea-side h2 { font-size: 1.35rem; margin-top: 14px; }
.idea-mailbox { width: clamp(96px, 12vw, 132px); overflow: visible; }
.idea-mailbox .leaf { fill: var(--leaf-1); }
.mb-letter { fill: #fffaf0; stroke: #d9b385; stroke-width: 1.5; opacity: 0; transform: translate(-40px, 6px) rotate(-12deg); transform-box: fill-box; transition: opacity .3s, transform .7s cubic-bezier(.3, 1.2, .5, 1); }
.idea-layout.is-sent .mb-letter { opacity: 1; transform: none; }
.idea-layout.is-sent .mb-flag { transform: rotate(0); transition-delay: .5s; }
.idea-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 14px; }
.idea-steps li { counter-increment: step; position: relative; padding-left: 42px; color: var(--ink-2); font-size: .95rem; }
.idea-steps li::before {
  content: counter(step); position: absolute; left: 0; top: -1px; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--line); color: var(--brand-ink); font: 600 .85rem var(--font-body);
}
.idea-steps strong { color: var(--ink); font-weight: 600; }
@media (max-width: 860px) {
  .idea-side { display: grid; grid-template-columns: auto 1fr; gap: 4px 20px; align-items: start; }
  .idea-mailbox { grid-row: span 2; width: 84px; }
  .idea-side h2 { margin-top: 0; }
}
@media (max-width: 480px) { .idea-chips { display: grid; grid-template-columns: 1fr 1fr; } .idea-chips .chip { justify-content: center; text-align: center; } }
