/* Final CTA band: layout of the Flicko slot + the story overlay (src/flicko-cta-story.js). Owner request 20/10/2026:
   the mascot sits centred between the end of the text column and the frame's right edge (and vertically in the frame);
   on phones he stacks above the text, centred and smaller. Overrides the older absolute rule in flicko-tokens.css.
   Motion is written by JS as transform / opacity only; the only filter is a STATIC blur on the smear element. */

.fk-cta-mascot { --fk-cs-size: clamp(132px, 12.5vw, 176px); }

@media (min-width: 768px) {
  div:has(> .fk-cta-mascot) { display: grid; grid-template-columns: fit-content(calc(60% - 3.5rem)) minmax(0, 1fr); align-items: center; }
  div:has(> .fk-cta-mascot) > .fk-cta-mascot ~ div { grid-column: 1; grid-row: 1; max-width: none; padding-right: 0; }
  div:has(> .fk-cta-mascot) > .fk-cta-mascot {
    grid-column: 2; grid-row: 1; position: relative; inset: auto; transform: none; display: block;
    justify-self: center; align-self: center;
  }
}
@media (max-width: 767px) {
  .fk-cta-mascot { --fk-cs-size: clamp(100px, 30vw, 128px); }
  div:has(> .fk-cta-mascot) { display: grid; grid-template-columns: minmax(0, 1fr); }
  div:has(> .fk-cta-mascot) > .fk-cta-mascot {
    grid-column: 1; grid-row: 1; position: relative; inset: auto; transform: none; display: flex; justify-content: center;
    padding-top: calc(var(--fk-cs-size) * .78); padding-bottom: calc(var(--fk-cs-size) * .2);
  }
  div:has(> .fk-cta-mascot) > .fk-cta-mascot ~ div { grid-column: 1; grid-row: 2; padding-top: .5rem; }
}

/* ---------- the story root: a box the size of the body; everything else overflows it (the frame clips) ---------- */
.fk-cs { --u: calc(var(--fk-cs-size, 160px) / 100); position: relative; width: var(--fk-cs-size, 160px); height: var(--fk-cs-size, 160px); line-height: 0; }
.fk-cs .fk-cs-body { position: absolute; inset: 0; transform-origin: 50% 100%; }
.fk-cs .flicko-m { display: block; }
.fk-cs .flicko-m .fm-fig { width: var(--fk-cs-size, 160px) !important; height: var(--fk-cs-size, 160px) !important; }
.fk-cs.is-story .flicko-m [data-card] { opacity: 0 !important; } /* the story uses its own, bigger post card */
.fk-cs .fk-cs-stage { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 2; pointer-events: none; }
.fk-cs.is-static .fk-cs-stage { display: none; }
.fk-cs-stage > * { position: absolute; display: block; opacity: 0; will-change: transform, opacity; }

/* thought bubble at the end of the rig's thinking dots (upper right of his head) */
.fk-cs-think {
  left: calc(var(--u) * 58); top: calc(var(--u) * -97); width: calc(var(--u) * 42); height: calc(var(--u) * 32);
  border-radius: 50%; background: #FBF8F6; box-shadow: 0 6px 18px -6px rgba(0, 0, 0, .45); transform-origin: 10% 90%;
}
.fk-cs-think::after { /* the small tail bubble */
  content: ''; position: absolute; left: calc(var(--u) * -3); bottom: calc(var(--u) * -3); width: calc(var(--u) * 8); height: calc(var(--u) * 8);
  border-radius: 50%; background: #FBF8F6;
}
.fk-cs-dots { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: calc(var(--u) * 3); }
.fk-cs-dots i { display: block; width: calc(var(--u) * 5); height: calc(var(--u) * 5); border-radius: 50%; background: #7B6A8A; }
.fk-cs-idea { position: absolute; left: 50%; top: 50%; width: calc(var(--u) * 22); height: calc(var(--u) * 24); margin: calc(var(--u) * -12) 0 0 calc(var(--u) * -11); opacity: 0; }
.fk-cs-idea svg { display: block; width: 100%; height: 100%; overflow: visible; }
.fk-cs-rays { position: absolute; left: 50%; top: 50%; width: 0; height: 0; opacity: 0; }
.fk-cs-rays i { position: absolute; left: calc(var(--u) * -1.2); top: calc(var(--u) * -19); width: calc(var(--u) * 2.4); height: calc(var(--u) * 5); border-radius: 99px; background: #FFD27A; transform-origin: 50% calc(var(--u) * 19); }
.fk-cs-rays i:nth-child(1) { transform: rotate(-50deg); }
.fk-cs-rays i:nth-child(2) { transform: rotate(-16deg); }
.fk-cs-rays i:nth-child(3) { transform: rotate(16deg); }
.fk-cs-rays i:nth-child(4) { transform: rotate(50deg); }

/* the post card (neutral customer-style content): image block, two text lines, colour swatches */
.fk-cs-card {
  left: calc(var(--u) * -22); top: calc(var(--u) * -27); width: calc(var(--u) * 44); height: calc(var(--u) * 54);
  border-radius: calc(var(--u) * 5); background: #fff; overflow: hidden;
  box-shadow: 0 calc(var(--u) * 3) calc(var(--u) * 8) rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .6) inset;
}
.fk-cs-img { position: absolute; left: 9%; right: 9%; top: 7.5%; height: 50%; border-radius: calc(var(--u) * 3); overflow: hidden; background: var(--c-bg, #A9D3F5); }
.fk-cs-sun { position: absolute; right: 16%; top: 14%; width: 24%; aspect-ratio: 1; border-radius: 50%; background: var(--c-sun, #fff); }
.fk-cs-hill, .fk-cs-hill2 { position: absolute; bottom: -38%; border-radius: 50%; }
.fk-cs-hill { left: -20%; width: 90%; height: 80%; background: var(--c-a, #3E8E5E); }
.fk-cs-hill2 { right: -25%; width: 85%; height: 66%; background: var(--c-b, #6FB08A); }
.fk-cs-line { position: absolute; left: 9%; height: 5.5%; border-radius: 99px; background: #D9D1E0; transform-origin: 0 50%; }
.fk-cs-l1 { top: 64%; width: 78%; }
.fk-cs-l2 { top: 74%; width: 52%; }
.fk-cs-sw { position: absolute; left: 9%; bottom: 7%; display: flex; gap: calc(var(--u) * 2); }
.fk-cs-sw i { display: block; width: calc(var(--u) * 4.6); height: calc(var(--u) * 4.6); border-radius: 50%; }
.fk-cs-sw i:nth-child(1) { background: var(--c-a, #3E8E5E); }
.fk-cs-sw i:nth-child(2) { background: var(--c-b, #6FB08A); }
.fk-cs-sw i:nth-child(3) { background: var(--c-bg, #A9D3F5); }
.fk-cs-shine { position: absolute; top: -20%; bottom: -20%; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent); opacity: 0; }
/* echo copies and the second card show the finished post; the main card's parts start hidden and are typed in */
.fk-cs-card.fk-cs-a .fk-cs-img, .fk-cs-card.fk-cs-a .fk-cs-line { opacity: 0; }
.fk-cs-card.fk-cs-a .fk-cs-sw i, .fk-cs-card.fk-cs-a .fk-cs-sun { transform: scale(.01); }
.fk-cs-echo .fk-cs-shine, .fk-cs-b .fk-cs-shine { display: none; }
.fk-cs-echo { box-shadow: none; }

/* motion blur smear: a pre-blurred white pill stretched backwards along the flight (opacity driven by speed) */
.fk-cs-smear {
  left: calc(var(--u) * -44); top: calc(var(--u) * -22); width: calc(var(--u) * 44); height: calc(var(--u) * 44);
  border-radius: calc(var(--u) * 22); background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .85));
  filter: blur(6px); transform-origin: 100% 50%;
}
.fk-cs-whoosh { left: 0; top: 0; overflow: visible; }
.fk-cs-tap { left: calc(var(--u) * -6); top: calc(var(--u) * -6); width: calc(var(--u) * 12); height: calc(var(--u) * 12); border-radius: 50%; border: 2px solid #FFD27A; }

/* celebration sparks (Urucum / Caju): dot, four-point star, small bar */
.fk-cs-spark { left: calc(var(--u) * -3); top: calc(var(--u) * -3); width: calc(var(--u) * 6); height: calc(var(--u) * 6); background: var(--c, #FFB21E); }
.fk-cs-s0 { border-radius: 50%; }
.fk-cs-s1 { left: calc(var(--u) * -4.5); top: calc(var(--u) * -4.5); width: calc(var(--u) * 9); height: calc(var(--u) * 9); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.fk-cs-s2 { height: calc(var(--u) * 2.6); width: calc(var(--u) * 8); top: calc(var(--u) * -1.3); left: calc(var(--u) * -4); border-radius: 99px; }

@media (prefers-reduced-motion: reduce) {
  .fk-cs-stage { display: none; }
  .fk-cs .fk-cs-body { transform: none !important; }
}
