/*
 * The opening screen: a sticker wall (Folk's opening, made of our things) that says what Saywork
 * does, on the home page's light ground with its pink and mint glow, Kit in the middle.
 * Always light, whatever the device's dark or high-contrast setting.
 * Everything here is static HTML + CSS so it shows on the very first paint; boot.js only adds
 * the pointer drift and lifts the screen away the moment the app draws into #app.
 */
#boot {
  --paper: #FAFBF8; --chalk: #EEF0EA; --graphite: #1D2023; --stone: #6B716C; --pink: #FF4F8B; --mint: #45D7A2;
  --edge: drop-shadow(2.5px 0 0 #fff) drop-shadow(-2.5px 0 0 #fff) drop-shadow(0 2.5px 0 #fff) drop-shadow(0 -2.5px 0 #fff) drop-shadow(0 10px 14px rgba(29, 32, 35, .2));
  --lift: 0 10px 22px -6px rgba(29, 32, 35, .24), 0 1px 2px rgba(29, 32, 35, .08);
  --mx: 0; --my: 0;
  position: fixed; inset: 0; z-index: 1000; overflow: hidden;
  background: var(--paper); color: var(--graphite);
  color-scheme: light; forced-color-adjust: none;
  font-family: var(--ui, "Figtree", system-ui, sans-serif);
  -webkit-user-select: none; user-select: none;
}
#boot.sb-out { pointer-events: none; animation: sb-leave .55s cubic-bezier(.4, 0, .2, 1) forwards; }
#boot.sb-out .sb-wall { animation: sb-scatter .55s cubic-bezier(.4, 0, .2, 1) forwards; }
#boot.sb-out .sb-mid { animation: sb-lift .55s cubic-bezier(.4, 0, .2, 1) forwards; }
@keyframes sb-leave { 60% { opacity: 1; } to { opacity: 0; } }
@keyframes sb-scatter { to { transform: scale(1.18); opacity: 0; } }
@keyframes sb-lift { to { transform: translate(-50%, -50%) scale(.9); opacity: 0; } }

/* ------------------------------------------------------------ the glow, exactly the home page's */
.sb-glow { position: absolute; z-index: 0; left: -20%; right: -20%; bottom: 0; height: 80%; pointer-events: none; overflow: hidden; }
.sb-glow::before, .sb-glow::after { content: ""; position: absolute; left: 0; right: 0; z-index: 3; }
.sb-glow::before { top: 0; height: 42%; background: linear-gradient(var(--paper), rgba(250, 251, 248, 0)); }
.sb-glow::after { bottom: 0; height: 12%; background: linear-gradient(rgba(250, 251, 248, 0), rgba(250, 251, 248, .6)); }
.sb-glow i { position: absolute; border-radius: 50%; will-change: transform; }
.sb-glow .b1 { left: 0; bottom: -22%; width: 52%; height: 96%; background: radial-gradient(closest-side, rgba(255, 79, 139, .95), rgba(255, 79, 139, .55) 45%, rgba(255, 79, 139, 0)); animation: sb-f1 13s ease-in-out infinite; }
.sb-glow .b2 { right: -2%; bottom: -18%; width: 54%; height: 100%; background: radial-gradient(closest-side, rgba(69, 215, 162, 1), rgba(69, 215, 162, .55) 45%, rgba(69, 215, 162, 0)); animation: sb-f2 15s ease-in-out infinite; }
.sb-glow .b3 { left: 26%; bottom: -34%; width: 44%; height: 80%; background: radial-gradient(closest-side, rgba(255, 140, 181, .95), rgba(255, 140, 181, 0)); animation: sb-f3 11s ease-in-out infinite; }
.sb-glow .b4 { left: 8%; top: 8%; width: 38%; height: 62%; background: radial-gradient(closest-side, rgba(110, 226, 184, .85), rgba(110, 226, 184, 0)); animation: sb-f4 17s ease-in-out infinite; }
.sb-glow .b5 { right: 10%; top: 4%; width: 36%; height: 64%; background: radial-gradient(closest-side, rgba(255, 170, 200, .9), rgba(255, 170, 200, 0)); animation: sb-f5 14s ease-in-out infinite; }
.sb-glow .b6 { left: 44%; top: 22%; width: 30%; height: 56%; background: radial-gradient(closest-side, rgba(69, 215, 162, .75), rgba(69, 215, 162, 0)); animation: sb-f6 12s ease-in-out infinite; }
@keyframes sb-f1 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(38%, -14%); } 66% { transform: translate(14%, 8%); } }
@keyframes sb-f2 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-34%, -10%); } 66% { transform: translate(-12%, 10%); } }
@keyframes sb-f3 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-40%, -18%); } }
@keyframes sb-f4 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(70%, 16%); } }
@keyframes sb-f5 { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-80%, 14%); } }
@keyframes sb-f6 { 0%, 100% { transform: translate(0, 0); } 33% { transform: translate(-90%, 20%); } 66% { transform: translate(60%, 10%); } }

/* ------------------------------------------------------------ the stickers */
.sb-wall { position: absolute; z-index: 1; inset: 0; transform-origin: 50% 50%; }
/*
 * Three layers per sticker, so the motions never fight: the spot (place + pointer drift by depth),
 * the pop (arrives with a spring, once) and the float (its own slow bob and sway, forever).
 */
.sb-s { position: absolute; left: var(--x); top: var(--y); --k: var(--z, 1);
  transform: translate(calc(var(--mx) * var(--k) * -14px), calc(var(--my) * var(--k) * -10px));
  transition: transform .9s cubic-bezier(.2, .7, .3, 1); }
.sb-s > .sb-p { display: block; animation: sb-pop .7s cubic-bezier(.34, 1.56, .64, 1) var(--d, 0s) both; }
.sb-s > .sb-p > * { transform: rotate(var(--r, 0deg)); animation: sb-float var(--t, 6s) ease-in-out calc(var(--d, 0s) - 3s) infinite; }
@keyframes sb-pop { from { transform: scale(0) rotate(-24deg); opacity: 0; } 40% { opacity: 1; } }
@keyframes sb-float {
  0%, 100% { transform: rotate(var(--r, 0deg)) translateY(0); }
  30% { transform: rotate(calc(var(--r, 0deg) + 3deg)) translateY(-7px); }
  70% { transform: rotate(calc(var(--r, 0deg) - 2deg)) translateY(4px); }
}

/* mascots: the sticker cut, a white edge and a soft drop */
.sb-m { display: block; line-height: 0; filter: var(--edge); }
.sb-m svg { display: block; overflow: visible; width: calc(var(--w, 96px) * .7 + 2.4vw); height: calc(var(--w, 96px) * .7 + 2.4vw); }

/* words: big, bold, our colours */
.sb-txt { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px 10px; border-radius: 18px; border: 3px solid #fff; font: 800 clamp(18px, 1.9vw, 25px)/1 var(--display, "Bricolage Grotesque", system-ui, sans-serif); letter-spacing: -.03em; color: var(--graphite); white-space: nowrap; box-shadow: var(--lift); }
.sb-txt svg { flex: none; }
.sb-txt.pink { background: var(--pink); }
.sb-txt.mint { background: var(--mint); }
.sb-txt.yellow { background: #F2CC58; }
.sb-txt.blue { background: #4C8DFF; color: #fff; }
.sb-txt.chalk { background: #fff; font-size: clamp(16px, 1.55vw, 21px); }
.sb-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--graphite); animation: sb-beat 1.2s ease-in-out infinite; }
@keyframes sb-beat { 50% { transform: scale(.55); opacity: .5; } }

/* tasks, as you would send them in a chat */
.sb-bub { position: relative; display: inline-block; padding: 11px 17px 12px; border-radius: 22px 22px 6px 22px; background: #2F80FF; color: #fff; font: 600 clamp(15px, 1.35vw, 18px)/1.15 var(--ui, "Figtree", system-ui, sans-serif); white-space: nowrap; box-shadow: var(--lift); border: 3px solid #fff; }
.sb-bub.grey { background: #fff; color: var(--graphite); border-radius: 22px 22px 22px 6px; }
.sb-bub.yellow { background: #F2CC58; color: var(--graphite); }

/* the apps Kit works with: their own marks, unmodified, on white */
.sb-logo { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: #fff; box-shadow: var(--lift); }
.sb-logo img { display: block; width: 34px; height: 34px; object-fit: contain; }

/* where Kit works */
.sb-place { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px; border-radius: 999px; background: #fff; color: var(--graphite); font: 700 clamp(14px, 1.25vw, 17px)/1 var(--ui, "Figtree", system-ui, sans-serif); white-space: nowrap; box-shadow: var(--lift); }
.sb-place img, .sb-place svg { flex: none; }

/* ------------------------------------------------------------ the middle: Kit, the name, the line */
.sb-mid { position: absolute; left: 50%; top: 50%; z-index: 2; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; text-align: center; }
/* a pool of paper under the middle, so the stickers tuck behind it */
.sb-mid::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: 400px; height: 400px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(closest-side, var(--paper) 60%, rgba(250, 251, 248, 0)); }
.sb-kit { --w: clamp(132px, 12vw, 176px); animation: sb-pop .8s cubic-bezier(.34, 1.56, .64, 1) .05s both; }
.sb-kit svg { width: var(--w) !important; height: var(--w) !important; animation-duration: 2.6s; }
.sb-wm { margin-top: 12px; font: 800 clamp(42px, 4.6vw, 58px)/1 var(--display, "Bricolage Grotesque", system-ui, sans-serif); letter-spacing: -.045em; padding: 0 .04em .06em 0;
  background: linear-gradient(90deg, #FF4F8B 0%, #EE4F8C 24%, #1A9A6C 52%, #0F7A55 72%, #0F7A55 84%, #FF4F8B 100%) 0 0 / 220% 100%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
  animation: sb-in .6s cubic-bezier(.2, .7, .3, 1) .2s both, sb-lim 9s ease-in-out .8s infinite alternate; }
@keyframes sb-lim { to { background-position: 100% 0; } }
.sb-tagline { margin: 8px 0 0; font: 600 clamp(15px, 1.3vw, 18px)/1.3 var(--ui, "Figtree", system-ui, sans-serif); color: var(--graphite); animation: sb-in .6s cubic-bezier(.2, .7, .3, 1) .3s both; }
.sb-line { margin-top: 16px; display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 16px 0 12px; border-radius: 999px; background: #fff; box-shadow: var(--lift); font-size: 14px; font-weight: 500; color: var(--stone); animation: sb-in .6s cubic-bezier(.2, .7, .3, 1) .4s both; }
@keyframes sb-in { from { opacity: 0; transform: translateY(10px); } }
/* the mark says it, then does it: the wave draws, the check lands, again */
.sb-mark { width: 30px; height: 18px; overflow: visible; }
.sb-mark path { fill: none; stroke-width: 5.5; stroke-linecap: round; stroke-linejoin: round; }
.sb-mark .w { stroke: var(--pink); stroke-dasharray: 34; animation: sb-say 2.2s ease-in-out infinite; }
.sb-mark .c { stroke: var(--graphite); stroke-dasharray: 46; animation: sb-do 2.2s ease-in-out infinite; }
@keyframes sb-say { 0% { stroke-dashoffset: 34; } 30%, 82% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -34; } }
@keyframes sb-do { 0%, 26% { stroke-dashoffset: 46; } 52%, 82% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: -46; } }

/* ------------------------------------------------------------ a tall screen gets its own wall */
@media (max-aspect-ratio: 1/1) {
  .sb-s { left: var(--px, var(--x)); top: var(--py, var(--y)); }
  .sb-s.wide { display: none; }
  .sb-m svg { width: calc(var(--w, 96px) * .82); height: calc(var(--w, 96px) * .82); }
  .sb-mid::before { width: 330px; height: 330px; }
  .sb-logo { width: 52px; height: 52px; border-radius: 16px; }
  .sb-logo img { width: 30px; height: 30px; }
}
@media (min-aspect-ratio: 1/1) { .sb-s.tall { display: none; } }

@media (prefers-reduced-motion: reduce) {
  #boot *, #boot *::before, #boot *::after { animation: none !important; transition: none !important; }
  .sb-mark .w, .sb-mark .c { stroke-dasharray: none; }
}
