/* SproutBox — coming soon. Built by apps/site/scripts/build-coming-soon.ts from the site stylesheet. */

/* ------------------------------------------------------------------
   SproutBox OS design tokens — SB-P01 §1.8.
   Every colour, radius, type ramp and spacing step lives here.
   Acceptance A1 (SB-P03): no hard-coded hex may appear in a component.
   ------------------------------------------------------------------ */

:root {
  /* --- palette (§1.8) --- */
  --sb-porcelain: #f2f4ef; /* page substrate */
  --sb-paper: #fbfcfa; /* panel surface */
  --sb-pine: #10231c; /* ink and dark panels */
  --sb-moss: #2f4f3e; /* structural accent */
  --sb-sprout: #b6e24a; /* live / approved state, used sparingly */
  --sb-turmeric: #e0a32e; /* community and entrepreneur track */
  --sb-iot: #2bb6a8; /* device and IoT states ONLY — never decorative */
  --sb-alert: #c64b32; /* exceptions and failures */

  /* --- semantic roles --- */
  --sb-page: var(--sb-porcelain);
  --sb-surface: var(--sb-paper);
  --sb-surface-dark: var(--sb-pine);
  --sb-ink: var(--sb-pine);
  --sb-ink-muted: color-mix(in srgb, var(--sb-pine) 62%, transparent);
  --sb-ink-inverse: var(--sb-porcelain);
  --sb-border: color-mix(in srgb, var(--sb-pine) 16%, transparent);
  --sb-border-strong: color-mix(in srgb, var(--sb-pine) 34%, transparent);
  --sb-focus: var(--sb-iot);

  --sb-state-pass: var(--sb-sprout);
  --sb-state-fail: var(--sb-alert);
  --sb-state-awaiting: var(--sb-turmeric);
  --sb-state-device: var(--sb-iot);

  /* --- typography (§1.8) --- */
  --sb-font-display: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;
  --sb-font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
  --sb-font-data: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;

  --sb-weight-display: 800;
  --sb-weight-display-soft: 600;
  --sb-weight-body: 400;
  --sb-weight-body-medium: 500;
  --sb-weight-body-strong: 600;

  --sb-size-eyebrow: 10px;
  --sb-size-xs: 11px;
  --sb-size-sm: 13px;
  --sb-size-base: 15px;
  --sb-size-lg: 18px;
  --sb-size-xl: 24px;
  --sb-size-metric: 34px;
  --sb-size-display: 44px;

  --sb-tracking-eyebrow: 0.18em;
  --sb-leading-tight: 1.15;
  --sb-leading-body: 1.5;

  /* --- shape: radius 4-5px, never pill-shaped (§1.8) --- */
  --sb-radius-sm: 4px;
  --sb-radius-md: 5px;
  --sb-radius-lg: 5px;

  /* --- spacing --- */
  --sb-space-1: 4px;
  --sb-space-2: 8px;
  --sb-space-3: 12px;
  --sb-space-4: 16px;
  --sb-space-5: 24px;
  --sb-space-6: 32px;
  --sb-space-7: 48px;

  /* --- layout --- */
  --sb-content-max: 1240px;
  --sb-rail-width: 232px;
  --sb-topbar-height: 56px;
  --sb-touch-target: 44px; /* kiosk minimum (SB-P03 §3.4) */

  --sb-border-width: 1px;
  --sb-focus-ring: 2px;
  --sb-shadow-panel: 0 1px 0 color-mix(in srgb, var(--sb-pine) 8%, transparent);

  --sb-duration-fast: 120ms;
  --sb-duration-base: 200ms;
  --sb-easing: cubic-bezier(0.2, 0, 0.2, 1);

  /* lab-bench grid substrate */
  --sb-grid-line: color-mix(in srgb, var(--sb-pine) 6%, transparent);
  --sb-grid-size: 24px;
}

/* §3.4 / §1.8 — respect prefers-reduced-motion everywhere. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --sb-duration-fast: 0ms;
    --sb-duration-base: 0ms;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.sb-root {
  background: var(--sb-page);
  color: var(--sb-ink);
  font-family: var(--sb-font-body);
  font-size: var(--sb-size-base);
  line-height: var(--sb-leading-body);
}

.sb-bench {
  background-image:
    linear-gradient(var(--sb-grid-line) var(--sb-border-width), transparent var(--sb-border-width)),
    linear-gradient(
      90deg,
      var(--sb-grid-line) var(--sb-border-width),
      transparent var(--sb-border-width)
    );
  background-size: var(--sb-grid-size) var(--sb-grid-size);
}

/* §3.4 — visible keyboard focus ring in the IoT teal on every interactive element. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: var(--sb-focus-ring) solid var(--sb-focus);
  outline-offset: 2px;
}

.sb-eyebrow {
  font-family: var(--sb-font-data);
  font-size: var(--sb-size-eyebrow);
  letter-spacing: var(--sb-tracking-eyebrow);
  text-transform: uppercase;
  color: var(--sb-ink-muted);
}

/* §1.8 — all IDs, batch numbers, timestamps, event codes and lot numbers are mono. */
.sb-data {
  font-family: var(--sb-font-data);
  font-size: var(--sb-size-sm);
  font-variant-numeric: tabular-nums;
}

.sb-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}


:root {
  /* --- SproutBox OS base typography & spacing tokens (§1.8) --- */
  --sb-font-display: 'Bricolage Grotesque', 'Public Sans', system-ui, sans-serif;
  --sb-font-body: 'Public Sans', system-ui, -apple-system, sans-serif;
  --sb-font-data: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;

  --sb-weight-display: 800;
  --sb-weight-display-soft: 600;
  --sb-weight-body: 400;
  --sb-weight-body-medium: 500;
  --sb-weight-body-strong: 600;

  --sb-size-eyebrow: 10px;
  --sb-size-xs: 11px;
  --sb-size-sm: 13px;
  --sb-size-base: 15px;
  --sb-size-lg: 18px;
  --sb-size-xl: 24px;
  --sb-size-metric: 34px;
  --sb-size-display: 44px;

  --sb-tracking-eyebrow: 0.18em;
  --sb-leading-tight: 1.15;
  --sb-leading-body: 1.5;

  --sb-radius-sm: 4px;
  --sb-radius-md: 5px;
  --sb-radius-lg: 5px;

  --sb-space-1: 4px;
  --sb-space-2: 8px;
  --sb-space-3: 12px;
  --sb-space-4: 16px;
  --sb-space-5: 24px;
  --sb-space-6: 32px;
  --sb-space-7: 48px;

  --sb-content-max: 1240px;
  --sb-rail-width: 232px;
  --sb-topbar-height: 56px;
  --sb-touch-target: 44px;

  --sb-border-width: 1px;
  --sb-focus-ring: 2px;

  --sprout-green-light: #a9d17e;
  --sprout-green: #6fae3e;
  --sprout-green-dark: #1e4a0f;
  --sprout-green-darker: #163a0b;
  --sprout-orange: #f2790c;
  --sprout-orange-dark: #d9660a;
  --sprout-gold: #e0a32e;
  --sprout-teal: #2bb6a8;
  --sprout-cream: #fbf9f1;
  --sprout-leaf: #4c8c2b;

  /* SB-P21 — background and header are fully pure white, as instructed. */
  --sb-page: #ffffff;
  --sb-surface: #ffffff;
  --sb-ink: var(--sprout-green-darker);
  --sb-moss: var(--sprout-green);
  --sb-pine: var(--sprout-green-darker);
  --sb-border: color-mix(in srgb, var(--sprout-green) 20%, transparent);
  --sb-border-strong: color-mix(in srgb, var(--sprout-green) 42%, transparent);
  --sb-grid-line: color-mix(in srgb, var(--sprout-green) 7%, transparent);

  /*
   * Figma-redesign tokens — scoped to this file only, same as every other
   * token above: the console (apps/web) reads none of these. The brand's
   * real deck-sourced greens/orange/gold above stay the anchor hue; this
   * tier only adds the shape and shadow language the Figma reference uses
   * (soft pill buttons, elevated cards) without shifting a single colour
   * the console shares.
   *
   * `--sb-pill-radius` and `--sb-radius-soft*` deliberately do NOT touch
   * `packages/ui/tokens.css`'s own `--sb-radius-*` ("never pill-shaped,
   * §1.8") — that rule still governs the console. These are new,
   * site-only names, not overrides of the shared ones.
   */
  --sb-pill-radius: 999px;
  --sb-radius-soft: 20px;
  --sb-radius-softer: 28px;
  --sb-shadow-soft: 0 20px 44px -26px color-mix(in srgb, var(--sprout-green-darker) 38%, transparent);
  --sb-shadow-softer: 0 30px 64px -30px color-mix(in srgb, var(--sprout-green-darker) 30%, transparent);
  --sb-shadow-lift: 0 16px 30px -16px color-mix(in srgb, var(--sprout-green-darker) 45%, transparent);
}

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

/* ------------------------------------------------ Mood box (SproutBoxMoodBox, packages/brand/src/moodBox.tsx)
   The brand loader: the box on its own, going through its moods while something loads (the section loader, the
   advisor's loader, and in a picture's place). The same rules are in apps/web/src/global.css for the console's
   loader; keep the two the same. A 10s loop that runs as long as the wait:
   curious 0–20%, sleepy 20–38%, surprised 38–54%, happy 54–74%, wink 74–88%, neutral 88–100% (1% = 0.1s).
   Faces change while the eyes are shut in a blink (8, 20, 38, 54, 74, 88, 95.5%), so a mood never pops.
   Parts turn about points given in artwork units (`transform-box: view-box`); the floating marks about their own
   middle. `--mb-delay` (a negative time) starts a box part-way through, so boxes side by side are not in step. */
.sb-moodbox {
  display: block;
  overflow: visible;
}

.sb-moodbox g,
.sb-moodbox text {
  transform-box: view-box;
}

.sb-moodbox [class^='mb-'],
.sb-moodbox [class*=' mb-'] {
  animation-duration: 10s;
  animation-iteration-count: infinite;
  animation-delay: var(--mb-delay, 0s);
  animation-timing-function: ease-in-out;
  animation-fill-mode: both;
}

/* the faces and marks that come and go start unseen; their animation shows them in turn */
.sb-moodbox .mb-eyes-open,
.sb-moodbox .mb-eyes-sleep,
.sb-moodbox .mb-eyes-wide,
.sb-moodbox .mb-eyes-happy,
.sb-moodbox .mb-eyes-wink,
.sb-moodbox .mb-mouth-small,
.sb-moodbox .mb-mouth-o,
.sb-moodbox .mb-mouth-grin,
.sb-moodbox .mb-mouth-smile,
.sb-moodbox .mb-cheeks,
.sb-moodbox .mb-question,
.sb-moodbox .mb-bang,
.sb-moodbox .mb-z,
.sb-moodbox .mb-spark {
  opacity: 0;
}

.sb-moodbox .mb-body { transform-origin: 46403px 23733px; animation-name: mb-body; }
.sb-moodbox .mb-shadow { transform-origin: 46403px 23980px; animation-name: mb-shadow; }
.sb-moodbox .mb-plant { transform-origin: 44512px 11700px; animation-name: mb-plant; }
.sb-moodbox .mb-eyes { transform-origin: 46200px 18450px; animation-name: mb-blink; animation-timing-function: linear; }
.sb-moodbox .mb-look { animation-name: mb-look; }
.sb-moodbox .mb-eyes-open { animation-name: mb-show-open; animation-timing-function: linear; }
.sb-moodbox .mb-eyes-sleep { animation-name: mb-show-sleep; animation-timing-function: linear; }
.sb-moodbox .mb-eyes-wide { animation-name: mb-show-wide; animation-timing-function: linear; }
.sb-moodbox .mb-eyes-happy { animation-name: mb-show-happy; animation-timing-function: linear; }
.sb-moodbox .mb-eyes-wink { animation-name: mb-show-wink; animation-timing-function: linear; }
.sb-moodbox .mb-mouth-small { animation-name: mb-mouth-small; animation-timing-function: linear; }
.sb-moodbox .mb-mouth-o { transform-origin: 46212px 20600px; animation-name: mb-mouth-o; }
.sb-moodbox .mb-mouth-grin { transform-origin: 46212px 20000px; animation-name: mb-mouth-grin; }
.sb-moodbox .mb-mouth-smile { animation-name: mb-mouth-smile; animation-timing-function: linear; }
.sb-moodbox .mb-cheeks { animation-name: mb-cheeks; }

.sb-moodbox .mb-question,
.sb-moodbox .mb-bang,
.sb-moodbox .mb-z,
.sb-moodbox .mb-spark {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.sb-moodbox .mb-question { transform-origin: 50% 100%; animation-name: mb-question; }
.sb-moodbox .mb-bang { transform-origin: 50% 100%; animation-name: mb-bang; }
.sb-moodbox .mb-z { animation-name: mb-z; }
.sb-moodbox .mb-z2 { animation-delay: calc(var(--mb-delay, 0s) + 0.25s); }
.sb-moodbox .mb-z3 { animation-delay: calc(var(--mb-delay, 0s) + 0.5s); }
.sb-moodbox .mb-spark { animation-name: mb-spark; }
.sb-moodbox .mb-spark2 { animation-delay: calc(var(--mb-delay, 0s) + 0.3s); }
.sb-moodbox .mb-spark3 { animation-delay: calc(var(--mb-delay, 0s) + 0.55s); }
.sb-moodbox .mb-spark-wink { animation-name: mb-spark-wink; }

/* the whole box: leans with its gaze, breathes when sleepy, jolts up when surprised, bounces twice when happy, tilts
   its head to wink. Rising eases out, falling eases in, and it squashes as it lands. */
@keyframes mb-body {
  0%, 3% { transform: translateY(0px) rotate(0deg) scale(1, 1); }
  5.5%, 10% { transform: translateY(0px) rotate(-4deg) scale(1, 1); }
  12.5%, 16.5% { transform: translateY(0px) rotate(4deg) scale(1, 1); }
  18.5%, 20% { transform: translateY(0px) rotate(0deg) scale(1, 1); }
  24.5% { transform: translateY(0px) rotate(0deg) scale(1.03, 0.95); }
  29% { transform: translateY(0px) rotate(0deg) scale(1, 1); }
  33.5% { transform: translateY(0px) rotate(0deg) scale(1.03, 0.95); }
  37.5% { transform: translateY(0px) rotate(0deg) scale(1.02, 0.97); }
  38% { transform: translateY(0px) rotate(0deg) scale(1.1, 0.86); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  40.5% { transform: translateY(-2600px) rotate(0deg) scale(0.92, 1.1); animation-timing-function: cubic-bezier(0.32, 0, 0.67, 0); }
  42.5% { transform: translateY(0px) rotate(0deg) scale(1.14, 0.86); }
  44.5% { transform: translateY(0px) rotate(0deg) scale(0.97, 1.03); }
  46%, 55% { transform: translateY(0px) rotate(0deg) scale(1, 1); }
  56.5% { transform: translateY(0px) rotate(0deg) scale(1.08, 0.9); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  58.5% { transform: translateY(-1500px) rotate(0deg) scale(0.96, 1.05); animation-timing-function: cubic-bezier(0.32, 0, 0.67, 0); }
  60.5% { transform: translateY(0px) rotate(0deg) scale(1.1, 0.9); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  62.5% { transform: translateY(-1100px) rotate(0deg) scale(0.97, 1.04); animation-timing-function: cubic-bezier(0.32, 0, 0.67, 0); }
  64.5% { transform: translateY(0px) rotate(0deg) scale(1.07, 0.93); }
  66.5%, 74% { transform: translateY(0px) rotate(0deg) scale(1, 1); }
  77%, 85% { transform: translateY(0px) rotate(6deg) scale(1, 1); }
  88%, 100% { transform: translateY(0px) rotate(0deg) scale(1, 1); }
}

/* the ground shadow shrinks and fades as the box leaves the ground */
@keyframes mb-shadow {
  0%, 37.5% { opacity: 1; transform: scale(1, 1); }
  38% { opacity: 1; transform: scale(1.1, 1); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  40.5% { opacity: 0.45; transform: scale(0.6, 0.6); animation-timing-function: cubic-bezier(0.32, 0, 0.67, 0); }
  42.5% { opacity: 1; transform: scale(1.14, 1); }
  46%, 55% { opacity: 1; transform: scale(1, 1); }
  56.5% { opacity: 1; transform: scale(1.08, 1); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  58.5% { opacity: 0.6; transform: scale(0.75, 0.75); animation-timing-function: cubic-bezier(0.32, 0, 0.67, 0); }
  60.5% { opacity: 1; transform: scale(1.1, 1); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  62.5% { opacity: 0.7; transform: scale(0.82, 0.82); animation-timing-function: cubic-bezier(0.32, 0, 0.67, 0); }
  64.5% { opacity: 1; transform: scale(1.06, 1); }
  66.5%, 100% { opacity: 1; transform: scale(1, 1); }
}

/* the sprout droops when sleepy (to the left, clear of the "z z z"), springs up when surprised, waves when happy */
@keyframes mb-plant {
  0%, 20% { transform: rotate(0deg) scale(1, 1); }
  25%, 35% { transform: rotate(-16deg) scale(1, 0.9); }
  38% { transform: rotate(-4deg) scale(1, 0.9); animation-timing-function: cubic-bezier(0.33, 1, 0.68, 1); }
  40.5% { transform: rotate(0deg) scale(1, 1.2); }
  43% { transform: rotate(-6deg) scale(1, 0.94); }
  45.5% { transform: rotate(4deg) scale(1, 1.03); }
  48%, 56% { transform: rotate(0deg) scale(1, 1); }
  58.5% { transform: rotate(-10deg) scale(1, 1); }
  61% { transform: rotate(9deg) scale(1, 1); }
  63.5% { transform: rotate(-8deg) scale(1, 1); }
  66% { transform: rotate(6deg) scale(1, 1); }
  69%, 100% { transform: rotate(0deg) scale(1, 1); }
}

/* a blink at every change of face, and one more in each calm spell; the eyes pop open wide at the surprise */
@keyframes mb-blink {
  0%, 7% { transform: scale(1, 1); }
  8% { transform: scale(1, 0.1); }
  9%, 19% { transform: scale(1, 1); }
  20% { transform: scale(1, 0.1); }
  21.5%, 37.5% { transform: scale(1, 1); }
  38% { transform: scale(1, 0.2); }
  39.5% { transform: scale(1.12, 1.2); }
  41%, 53% { transform: scale(1, 1); }
  54% { transform: scale(1, 0.1); }
  55%, 73% { transform: scale(1, 1); }
  74% { transform: scale(1, 0.1); }
  75%, 87% { transform: scale(1, 1); }
  88% { transform: scale(1, 0.1); }
  89%, 94.5% { transform: scale(1, 1); }
  95.5% { transform: scale(1, 0.1); }
  96.5%, 100% { transform: scale(1, 1); }
}

/* curious: the eyes look left, then right, then back */
@keyframes mb-look {
  0%, 3% { transform: translate(0px, 0px); }
  5%, 10% { transform: translate(-480px, -80px); }
  12.5%, 16.5% { transform: translate(480px, -80px); }
  18.5%, 100% { transform: translate(0px, 0px); }
}

@keyframes mb-show-open {
  0%, 19.99% { opacity: 1; }
  20%, 87.99% { opacity: 0; }
  88%, 100% { opacity: 1; }
}

@keyframes mb-show-sleep {
  0%, 19.99% { opacity: 0; }
  20%, 37.99% { opacity: 1; }
  38%, 100% { opacity: 0; }
}

@keyframes mb-show-wide {
  0%, 37.99% { opacity: 0; }
  38%, 53.99% { opacity: 1; }
  54%, 100% { opacity: 0; }
}

@keyframes mb-show-happy {
  0%, 53.99% { opacity: 0; }
  54%, 73.99% { opacity: 1; }
  74%, 100% { opacity: 0; }
}

@keyframes mb-show-wink {
  0%, 73.99% { opacity: 0; }
  74%, 87.99% { opacity: 1; }
  88%, 100% { opacity: 0; }
}

/* a small smile, except for the yawn (24–31%) and from the surprise to the wink */
@keyframes mb-mouth-small {
  0%, 23.99% { opacity: 1; }
  24%, 30.99% { opacity: 0; }
  31%, 37.99% { opacity: 1; }
  38%, 87.99% { opacity: 0; }
  88%, 100% { opacity: 1; }
}

/* an "O": a slow yawn when sleepy, a gasp when surprised */
@keyframes mb-mouth-o {
  0%, 23.99% { opacity: 0; transform: scale(0.4, 0.4); }
  24% { opacity: 1; transform: scale(0.4, 0.4); }
  26.5% { opacity: 1; transform: scale(1.15, 1.45); }
  29% { opacity: 1; transform: scale(1.05, 1.3); }
  30.99% { opacity: 1; transform: scale(0.4, 0.4); }
  31%, 37.99% { opacity: 0; transform: scale(0.4, 0.4); }
  38% { opacity: 1; transform: scale(0.5, 0.5); }
  39.5% { opacity: 1; transform: scale(1.1, 1.15); }
  41.5%, 53.99% { opacity: 1; transform: scale(0.85, 0.9); }
  54%, 100% { opacity: 0; transform: scale(0.4, 0.4); }
}

/* happy: a big open grin that pops wide */
@keyframes mb-mouth-grin {
  0%, 53.99% { opacity: 0; transform: scale(0.5, 0.5); }
  54% { opacity: 1; transform: scale(0.5, 0.5); }
  56% { opacity: 1; transform: scale(1.1, 1.12); }
  57.5%, 73.99% { opacity: 1; transform: scale(1, 1); }
  74%, 100% { opacity: 0; transform: scale(1, 1); }
}

@keyframes mb-mouth-smile {
  0%, 73.99% { opacity: 0; }
  74%, 87.99% { opacity: 1; }
  88%, 100% { opacity: 0; }
}

@keyframes mb-cheeks {
  0%, 54% { opacity: 0; }
  56%, 86% { opacity: 1; }
  88%, 100% { opacity: 0; }
}

@keyframes mb-question {
  0%, 3% { opacity: 0; transform: scale(0.2) rotate(-20deg); }
  5% { opacity: 1; transform: scale(1.15) rotate(-8deg); }
  6.5% { opacity: 1; transform: scale(1) rotate(0deg); }
  10% { opacity: 1; transform: scale(1) rotate(10deg); }
  13.5% { opacity: 1; transform: scale(1) rotate(-8deg); }
  16.5% { opacity: 1; transform: scale(1) rotate(0deg); }
  18.5%, 100% { opacity: 0; transform: scale(0.6) rotate(0deg); }
}

@keyframes mb-bang {
  0%, 38.5% { opacity: 0; transform: scale(0.3); }
  40% { opacity: 1; transform: scale(1.3); }
  41.5% { opacity: 1; transform: scale(0.95); }
  43%, 48.5% { opacity: 1; transform: scale(1); }
  50.5%, 100% { opacity: 0; transform: scale(0.8); }
}

/* each "z" drifts up and away, a little bigger as it goes */
@keyframes mb-z {
  0%, 24% { opacity: 0; transform: translate(0px, 0px) scale(0.5); }
  26% { opacity: 1; transform: translate(150px, -300px) scale(0.9); }
  33% { opacity: 1; transform: translate(700px, -1300px) scale(1.05); }
  36%, 100% { opacity: 0; transform: translate(900px, -1700px) scale(1.1); }
}

@keyframes mb-spark {
  0%, 56% { opacity: 0; transform: scale(0) rotate(0deg); }
  58.5% { opacity: 1; transform: scale(1.2) rotate(45deg); }
  61% { opacity: 1; transform: scale(0.85) rotate(70deg); }
  63.5% { opacity: 1; transform: scale(1.1) rotate(90deg); }
  67% { opacity: 1; transform: scale(0.6) rotate(120deg); }
  69.5% { opacity: 1; transform: scale(1) rotate(150deg); }
  72.5%, 100% { opacity: 0; transform: scale(0) rotate(180deg); }
}

@keyframes mb-spark-wink {
  0%, 77% { opacity: 0; transform: scale(0) rotate(0deg); }
  79% { opacity: 1; transform: scale(1.3) rotate(60deg); }
  81% { opacity: 1; transform: scale(0.9) rotate(90deg); }
  84% { opacity: 1; transform: scale(1) rotate(120deg); }
  86.5%, 100% { opacity: 0; transform: scale(0) rotate(160deg); }
}

/* with reduced motion, the box simply smiles, still */
@media (prefers-reduced-motion: reduce) {
  .sb-moodbox [class^='mb-'],
  .sb-moodbox [class*=' mb-'] {
    animation: none;
  }

  .sb-moodbox .mb-eyes-happy,
  .sb-moodbox .mb-mouth-smile,
  .sb-moodbox .mb-cheeks {
    opacity: 1;
  }
}

/* The mood box in a picture's place: it fills the picture's frame on a soft background, sized to the frame, and
   fades out when the picture arrives (`is-done`). */
.sb-img-wait {
  position: absolute;
  inset: 0;
  display: grid;
  /* one cell the size of the frame, so the box's height can be a share of it */
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  overflow: hidden;
  background: radial-gradient(circle at 50% 42%, #fffaf0 0%, #f4f8ee 55%, #e8f1de 100%);
  pointer-events: none;
  transition: opacity 0.35s ease;
}

/* sized by the frame's height (with room above for its hops), never wider than most of a narrow frame */
.sb-img-wait .sb-moodbox {
  height: min(58%, 170px);
  width: auto;
  max-width: 70%;
}

.sb-img-wait.is-done {
  opacity: 0;
}


/* ------------------------------------------------ Coming soon (`/coming-soon/`, src/comingSoon/renderComingSoon.tsx)
   The mood box large on a softly moving garden. The speech bubble's captions (`cs-win-*`) run on the mood box's own
   10s clock, so the words follow its face: curious 0–20%, sleepy 20–38%,
   surprised 38–54%, happy 54–74%, wink 74–88%, neutral 88–100%. CSS only; reduced motion holds everything still. */
.cs-body {
  margin: 0;
  min-height: 100vh;
  background: var(--sprout-cream);
  color: var(--sprout-green-darker);
  font-family: var(--sb-font-body);
}

.cs-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(242, 121, 12, 0.12), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(111, 174, 62, 0.18), transparent 60%),
    linear-gradient(180deg, #fbf9f1 0%, #f3f7ea 100%);
}

/* ---- the garden behind everything */
.cs-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.cs-sun {
  position: absolute;
  top: -120px;
  right: -80px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254, 177, 5, 0.35) 0%, rgba(254, 177, 5, 0.08) 55%, transparent 70%);
  animation: cs-pulse 6s ease-in-out infinite;
}

.cs-blob {
  position: absolute;
  border-radius: 46% 54% 60% 40% / 52% 40% 60% 48%;
  filter: blur(2px);
  opacity: 0.55;
  animation: cs-morph 18s ease-in-out infinite;
}

.cs-blob-1 { width: 280px; height: 280px; left: -90px; top: 18%; background: rgba(169, 209, 126, 0.35); }
.cs-blob-2 { width: 220px; height: 220px; right: 8%; bottom: 6%; background: rgba(43, 182, 168, 0.16); animation-delay: -6s; }
.cs-blob-3 { width: 160px; height: 160px; left: 42%; top: -60px; background: rgba(242, 121, 12, 0.12); animation-delay: -11s; }

.cs-leaf {
  position: absolute;
  top: -60px;
  width: 34px;
  height: 34px;
  fill: var(--sprout-green);
  opacity: 0.75;
  animation: cs-fall 16s linear infinite;
}

.cs-leaf-vein {
  fill: none;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.6;
  stroke-linecap: round;
}

.cs-leaf-1 { left: 6%; animation-duration: 17s; animation-delay: -2s; }
.cs-leaf-2 { left: 18%; width: 22px; height: 22px; fill: var(--sprout-leaf); animation-duration: 13s; animation-delay: -9s; }
.cs-leaf-3 { left: 33%; width: 28px; height: 28px; fill: var(--sprout-green-light); animation-duration: 19s; animation-delay: -5s; }
.cs-leaf-4 { left: 52%; width: 20px; height: 20px; animation-duration: 15s; animation-delay: -12s; }
.cs-leaf-5 { left: 66%; width: 30px; height: 30px; fill: var(--sprout-leaf); animation-duration: 18s; animation-delay: -1s; }
.cs-leaf-6 { left: 78%; width: 24px; height: 24px; fill: var(--sprout-gold); opacity: 0.6; animation-duration: 14s; animation-delay: -7s; }
.cs-leaf-7 { left: 88%; animation-duration: 20s; animation-delay: -14s; }
.cs-leaf-8 { left: 95%; width: 18px; height: 18px; fill: var(--sprout-green-light); animation-duration: 12s; animation-delay: -4s; }

.cs-seed {
  position: absolute;
  bottom: -20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(111, 174, 62, 0.45);
  animation: cs-rise 11s ease-in infinite;
}

.cs-seed-1 { left: 10%; animation-delay: -1s; }
.cs-seed-2 { left: 24%; width: 6px; height: 6px; background: rgba(242, 121, 12, 0.4); animation-delay: -6s; }
.cs-seed-3 { left: 47%; animation-delay: -3s; }
.cs-seed-4 { left: 61%; width: 5px; height: 5px; animation-delay: -8s; }
.cs-seed-5 { left: 74%; width: 7px; height: 7px; background: rgba(254, 177, 5, 0.5); animation-delay: -4.5s; }
.cs-seed-6 { left: 90%; animation-delay: -9.5s; }

/* ---- header */
.cs-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, 100% - 32px);
  margin: 0 auto;
  padding: 22px 0 0;
}

.cs-brand {
  display: inline-flex;
  border-radius: 8px;
}

.cs-brand:focus-visible {
  outline: 3px solid var(--sprout-orange);
  outline-offset: 4px;
}

.cs-brand svg {
  height: 46px;
  width: auto;
}

.cs-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(30, 74, 15, 0.12);
  box-shadow: 0 6px 18px rgba(30, 74, 15, 0.08);
  font-size: 13px;
  font-weight: 600;
  color: var(--sprout-green-dark);
  backdrop-filter: blur(6px);
}

.cs-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--sprout-orange);
  box-shadow: 0 0 0 0 rgba(242, 121, 12, 0.5);
  animation: cs-ping 2s ease-out infinite;
}

/* ---- the stage: the box on one side, the words on the other */
.cs-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 48px;
  width: min(1180px, 100% - 32px);
  margin: 0 auto;
  padding: 32px 0 40px;
}

.cs-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
}

.cs-mascot {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(300px, 42vw, 470px);
}

.cs-ring {
  position: absolute;
  width: min(86%, 420px);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px dashed rgba(111, 174, 62, 0.35);
  animation: cs-spin 40s linear infinite;
}

.cs-ring-2 {
  width: min(64%, 310px);
  border: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 250, 240, 0.85) 45%, rgba(233, 243, 222, 0) 72%);
  animation: cs-pulse 5s ease-in-out infinite;
}

.cs-box {
  position: relative;
  height: clamp(220px, 30vw, 340px);
  width: auto;
  filter: drop-shadow(0 18px 26px rgba(30, 74, 15, 0.18));
}

/* What the box is thinking: one caption at a time, on the box's clock. */
.cs-bubble {
  position: absolute;
  z-index: 1;
  top: 2%;
  left: 50%;
  transform: translateX(-100%);
  display: grid;
  min-width: 190px;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  background: #ffffff;
  border: 1px solid rgba(30, 74, 15, 0.1);
  box-shadow: 0 14px 30px rgba(30, 74, 15, 0.12);
  font-family: var(--sb-font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--sprout-green-dark);
  text-align: center;
}

.cs-bubble::after {
  content: '';
  position: absolute;
  right: -7px;
  bottom: 10px;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-right: 1px solid rgba(30, 74, 15, 0.1);
  border-bottom: 1px solid rgba(30, 74, 15, 0.1);
  transform: rotate(-45deg);
}

.cs-say {
  grid-area: 1 / 1;
  opacity: 0;
  animation: 10s ease-in-out infinite both;
}

/* ---- the words */
.cs-eyebrow {
  display: inline-flex;
  margin: 0 0 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(111, 174, 62, 0.14);
  color: var(--sprout-green-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  animation: cs-up 0.8s 0.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.cs-title {
  margin: 0;
  font-family: var(--sb-font-display);
  font-weight: 800;
  font-size: clamp(44px, 7.4vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--sprout-green-darker);
}

.cs-line {
  display: inline-block;
  animation: cs-up 0.9s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.cs-soon {
  position: relative;
  animation-delay: 0.45s;
  background: linear-gradient(100deg, var(--sprout-green) 0%, var(--sprout-leaf) 35%, var(--sprout-orange) 70%, var(--sprout-gold) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation-name: cs-up, cs-shine;
  animation-duration: 0.9s, 6s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1), ease-in-out;
  animation-iteration-count: 1, infinite;
  animation-fill-mode: both, none;
}

.cs-dots {
  display: inline-flex;
  margin-left: 0.06em;
}

.cs-dots {
  gap: 0.08em;
  align-items: flex-end;
  padding-bottom: 0.14em;
}

.cs-dots i {
  display: block;
  width: 0.13em;
  height: 0.13em;
  border-radius: 50%;
  background: var(--sprout-orange);
  animation: cs-hop 1.4s ease-in-out infinite;
}

.cs-dots i:nth-child(2) { animation-delay: 0.15s; }
.cs-dots i:nth-child(3) { animation-delay: 0.3s; }

.cs-lead {
  max-width: 52ch;
  margin: 20px 0 0;
  font-size: clamp(16px, 1.6vw, 18px);
  line-height: 1.6;
  color: #3e5a33;
  animation: cs-up 0.9s 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* ---- seed, sprout, lunchbox: each lights up in turn, then all three together */
.cs-journey {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cs-journey::before {
  content: '';
  position: absolute;
  top: 34px;
  left: 12%;
  right: 12%;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--sprout-green-light), var(--sprout-green), var(--sprout-orange));
  background-size: 300% 100%;
  opacity: 0.5;
  animation: cs-flow 6s linear infinite;
}

.cs-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(30, 74, 15, 0.08);
  box-shadow: 0 10px 26px rgba(30, 74, 15, 0.06);
  backdrop-filter: blur(6px);
  animation: cs-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.cs-step-1 { animation-delay: 1s; }
.cs-step-2 { animation-delay: 1.15s; }
.cs-step-3 { animation-delay: 1.3s; }

.cs-step-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #f3f7ea;
  animation: cs-glow 6s ease-in-out infinite;
}

.cs-step-2 .cs-step-icon { animation-delay: 2s; }
.cs-step-3 .cs-step-icon { animation-delay: 4s; }

.cs-step-icon svg {
  width: 32px;
  height: 32px;
}

.cs-step-text {
  display: grid;
  gap: 2px;
  font-size: 13px;
  color: #55634d;
}

.cs-step-text strong {
  font-family: var(--sb-font-display);
  font-size: 16px;
  color: var(--sprout-green-darker);
}

/* ---- footer */
.cs-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  width: min(1180px, 100% - 32px);
  margin: 0 auto;
  padding: 18px 0 24px;
  border-top: 1px solid rgba(30, 74, 15, 0.1);
  font-size: 13px;
  color: #55634d;
}

.cs-foot-tag {
  font-style: italic;
}

/* ---- the captions' windows on the mood box's clock */
.cs-win-1 { animation-name: cs-say-1; }
.cs-win-2 { animation-name: cs-say-2; }
.cs-win-3 { animation-name: cs-say-3; }
.cs-win-4 { animation-name: cs-say-4; }
.cs-win-5 { animation-name: cs-say-5; }
.cs-win-6 { animation-name: cs-say-6; }

@keyframes cs-say-1 { 0%, 1% { opacity: 0; transform: translateY(6px); } 3%, 18% { opacity: 1; transform: none; } 20%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes cs-say-2 { 0%, 20% { opacity: 0; transform: translateY(6px); } 22%, 36% { opacity: 1; transform: none; } 38%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes cs-say-3 { 0%, 38% { opacity: 0; transform: scale(0.8); } 40%, 52% { opacity: 1; transform: scale(1); } 54%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes cs-say-4 { 0%, 54% { opacity: 0; transform: translateY(6px); } 56%, 72% { opacity: 1; transform: none; } 74%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes cs-say-5 { 0%, 74% { opacity: 0; transform: translateY(6px) rotate(-2deg); } 76%, 86% { opacity: 1; transform: rotate(-2deg); } 88%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes cs-say-6 { 0%, 88% { opacity: 0; transform: translateY(6px); } 90%, 98.5% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-6px); } }


/* ---- the page's own motion */
@keyframes cs-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes cs-shine { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes cs-hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-0.18em); } }
@keyframes cs-spin { to { transform: rotate(360deg); } }
@keyframes cs-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes cs-morph { 0%, 100% { border-radius: 46% 54% 60% 40% / 52% 40% 60% 48%; transform: translate(0, 0) rotate(0deg); } 50% { border-radius: 58% 42% 38% 62% / 42% 60% 40% 58%; transform: translate(20px, -16px) rotate(18deg); } }
@keyframes cs-fall { 0% { transform: translate(0, -60px) rotate(0deg); } 25% { transform: translate(28px, 25vh) rotate(90deg); } 50% { transform: translate(-18px, 52vh) rotate(180deg); } 75% { transform: translate(24px, 80vh) rotate(270deg); } 100% { transform: translate(0, 112vh) rotate(360deg); } }
@keyframes cs-rise { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-100vh); opacity: 0; } }
@keyframes cs-ping { 0% { box-shadow: 0 0 0 0 rgba(242, 121, 12, 0.5); } 80%, 100% { box-shadow: 0 0 0 10px rgba(242, 121, 12, 0); } }
@keyframes cs-flow { to { background-position: 300% 0; } }
@keyframes cs-glow { 0%, 25%, 100% { background: #f3f7ea; transform: none; } 10% { background: #fff1de; transform: translateY(-3px) scale(1.06); } }

@media (max-width: 860px) {
  .cs-stage {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cs-lead { margin-left: auto; margin-right: auto; }
  .cs-mascot { min-height: 300px; }
  .cs-journey { grid-template-columns: 1fr; }
  .cs-journey::before { display: none; }
}

@media (max-width: 480px) {
  .cs-brand svg { height: 36px; }
  .cs-badge { padding: 6px 10px; font-size: 12px; }
  .cs-bubble { min-width: 160px; font-size: 14px; left: 54%; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-page *,
  .cs-page *::before,
  .cs-page *::after {
    animation: none !important;
    transition: none !important;
  }

  .cs-leaf, .cs-seed { display: none; }
  /* still, the box is happy (see the mood box's own rule), so the bubble says the happy line */
  .cs-say { opacity: 0; }
  .cs-win-4 { opacity: 1; }
}
