:host {
  display: block;
  --s: var(--logo-size, 420px);
  --brand: var(--brand-size, calc(var(--s) * 0.22));
  --flower-h: calc(var(--s) * 0.755); /* flower is 0.42s wide, aspect 336:604 */
}

.lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.art {
  position: relative;
  translate: var(--art-shift, 0) 0;
}

ss-flower {
  display: block;
  --flower-size: calc(var(--s) * 0.42);
  /* the home page's scroll morph glides the flower into the top bar (none at rest) */
  transform: var(--morph-flower, none);
  transform-origin: 0 0;
  will-change: var(--morph-will, auto);
}

/* pull the name up so the stem stands in the gap between the words, on the underline */
ss-sketchysprouts {
  position: relative;
  z-index: 1;
  margin-top: calc(var(--flower-h) * -0.01 - var(--brand) * 1.06);
  --brand-size: var(--brand);
  --brand-gap: 0.32em;
  --brand-delay: 1.5s;
}

/* stacked (phones): the stem is planted behind "sketchy"; --brand-drop (set by logo.js) lowers the
   words so the stem only reaches part way into them */
:host([stacked]) ss-sketchysprouts {
  margin-top: calc(var(--flower-h) * -0.01 - var(--brand) * 0.84 + var(--brand-drop, 0px));
}

/* ---------- decorative sparkles (pop in once, after the flower lands) ---------- */
.sparkle, .dot {
  position: absolute;
  transform: scale(0);
  opacity: var(--morph-fade, 1);
  animation: pop 0.5s cubic-bezier(0.34, 1.8, 0.64, 1) forwards;
}

.sparkle path {
  fill: var(--color-face);
  stroke: var(--color-ink);
  stroke-width: 2.2;
  stroke-linejoin: round;
}
.s1 { width: calc(var(--s) * 0.075); left: -16%; top: 12%; rotate: -8deg; animation-delay: 1.95s; }
.s2 { width: calc(var(--s) * 0.05);  right: -12%; top: 4%;  rotate: 12deg; animation-delay: 2.1s; }
.s3 { width: calc(var(--s) * 0.035); right: -22%; top: 34%; animation-delay: 2.25s; }
.s3 path { fill: var(--color-petal-light); }

.dot {
  width: calc(var(--s) * 0.018);
  aspect-ratio: 1;
  border-radius: 50%;
  border: calc(var(--s) * 0.004) solid var(--color-ink);
}
.d1 { left: -6%;  top: 36%; background: var(--color-petal); animation-delay: 2.05s; }
.d2 { right: -4%; top: 22%; background: var(--color-leaf-light); animation-delay: 2.2s; }

@keyframes pop { to { transform: scale(1); } }

/* stacked (phones): the flower sits over the left of the text, so the big sparkle moves up-right
   and the left dot tucks in closer */
:host([stacked]) .s1 { left: 78%; top: -9%; rotate: 10deg; }
:host([stacked]) .d1 { left: auto; right: -10%; top: 44%; }

@media (prefers-reduced-motion: reduce) {
  .sparkle, .dot { animation: none; transform: none; }
}
