/*
 * Zeitfinder 6.9.74 — experimental playful landing layer.
 *
 * Hand-drawn vector doodles in the Kärtli mascot style (flat brand fills, olive-black
 * outlines, round caps). Everything is scoped to `.zf-pf` (the landing <main>) and is
 * switched off entirely with ZF_PLAYFUL_LANDING=0. Only transform, opacity, stroke-dash
 * and clip-path are animated. Reduced motion shows one meaningful still frame.
 */

.zf-pf {
  --pf-ink: var(--zf-ink-900);
  --pf-ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --pf-ease: cubic-bezier(.22, .68, .18, 1);
  --pf-mx: 0;
  --pf-my: 0;
}

/* ---------- Shared SVG paint ---------- */
.zf-pf svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* ---------- Hero doodles ---------- */
.zf-pf .zf-hero-copy { position: relative; }
.zf-pf .zf-pf-doodle {
  position: absolute;
  z-index: 0;
  display: block;
  pointer-events: none;
  /* gentle parallax from zf-playful.js; composes with the doodles' own transforms */
  translate: calc(var(--pf-mx) * var(--pf-depth, 8) * 1px) calc(var(--pf-my) * var(--pf-depth, 8) * 1px);
  transition: translate .6s var(--pf-ease);
}
.zf-pf .zf-pf-doodle > svg { animation: zfPfBoil 1.5s steps(1) infinite; }
.zf-pf .zf-hero-copy > :not(.zf-pf-doodle) { position: relative; z-index: 1; }

/* ---------- Hero preview: someone books a slot ---------- */
.zf-pf .zf-demo-grid span.zf-pf-pick {
  position: relative;
  z-index: 2;
}
.zf-pf .zf-pf-pick > * { position: absolute; pointer-events: none; }
/* 6.9.127: the orange fill is its own layer that only fades and scales. The cell itself used to
   animate background + transform, so Chrome repainted a composited layer every frame. On screens
   with fractional scaling (Windows 125 % / 150 %) that left a light 1px seam across the orange cell. */
.zf-pf .zf-pf-fill {
  inset: 0;
  border-radius: inherit;
  background: var(--zf-palette-orange);
  opacity: 0;
  animation: zfPfPickCell 9s var(--pf-ease) infinite;
}
.zf-pf .zf-pf-cursor {
  left: 52%; top: 52%;
  width: 26px; height: 26px;
  overflow: visible;
  filter: drop-shadow(0 3px 4px rgb(28 36 23 / .18));
  animation: zfPfCursor 9s var(--pf-ease) infinite;
}
.zf-pf .zf-pf-cursor path { fill: var(--zf-paper-sheet); stroke: var(--pf-ink); stroke-width: 1.7; stroke-linejoin: round; }
.zf-pf .zf-pf-tick { inset: 18%; width: 64%; height: 64%; }
.zf-pf .zf-pf-tick path { fill: none; stroke: var(--zf-paper-sheet); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; animation: zfPfTick 9s var(--pf-ease) infinite; }
.zf-pf .zf-pf-ring { inset: -2px; border: 2px solid var(--zf-palette-orange); border-radius: 8px; opacity: 0; animation: zfPfRipple 9s ease-out infinite; }
.zf-pf .zf-pf-bits { left: 50%; top: 50%; width: 0; height: 0; }
.zf-pf .zf-pf-bits b {
  position: absolute;
  left: -4px; top: -5px;
  width: 8px; height: 10px;
  border: 1.5px solid var(--pf-ink);
  border-radius: 2.5px;
  background: var(--zf-palette-lime);
  opacity: 0;
  animation: zfPfBit 9s var(--pf-ease) infinite;
}
.zf-pf .zf-pf-bits b:nth-child(1) { --pf-bx: -52px; --pf-by: -46px; --pf-br: -40deg; }
.zf-pf .zf-pf-bits b:nth-child(2) { --pf-bx: 6px; --pf-by: -64px; --pf-br: 25deg; background: var(--zf-palette-orange); }
.zf-pf .zf-pf-bits b:nth-child(3) { --pf-bx: 56px; --pf-by: -40px; --pf-br: 70deg; background: var(--zf-palette-sun); }
.zf-pf .zf-pf-bits b:nth-child(4) { --pf-bx: 60px; --pf-by: 20px; --pf-br: -60deg; background: var(--zf-palette-leaf); }
.zf-pf .zf-pf-bits b:nth-child(5) { --pf-bx: -58px; --pf-by: 18px; --pf-br: 45deg; background: var(--zf-palette-sun); }
.zf-pf .zf-pf-bits b:nth-child(6) { --pf-bx: -8px; --pf-by: 56px; --pf-br: -15deg; }

/* ---------- Hero Kärtli: poke it ---------- */
.zf-pf .zf-mascot-hero.zf-pf-poke { pointer-events: auto; cursor: pointer; }
.zf-pf .zf-mascot-hero.zf-pf-boing { animation: zfPfBoing .9s var(--pf-ease-pop) 1 !important; }

/* ---------- Hand-drawn underline under every handwritten kicker ---------- */
.zf-pf .zf-kicker { position: relative; width: fit-content; }
.zf-pf .zf-final-cta .zf-kicker { margin-inline: auto; }
.zf-pf .zf-kicker::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -4%;
  bottom: -7px;
  height: 9px;
  background: var(--zf-palette-orange);
  opacity: .8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8C38 3 74 10 112 6S170 2 197 6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M3 8C38 3 74 10 112 6S170 2 197 6' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  clip-path: inset(0 0 0 0);
}
.zf-reveal-sequenced .zf-pf [data-reveal]:not(.is-visible) .zf-kicker::after { clip-path: inset(0 100% 0 0); }
.zf-reveal-sequenced .zf-pf [data-reveal].is-visible .zf-kicker::after { animation: zfPfUnderline .8s .45s var(--pf-ease) both; }

/* 6.9.156: the hover wobble on the schools card icons is gone (user: no wiggle on icons). */

/* ---------- Pause everything that is off screen (set by zf-playful.js) ---------- */
.zf-pf .zf-pf-idle *,
.zf-pf .zf-pf-idle *::after { animation-play-state: paused !important; }

/* ---------- Keyframes ---------- */
@keyframes zfPfBoil {
  0% { transform: rotate(-1.2deg) translate(0, 0); }
  33% { transform: rotate(.8deg) translate(.6px, -.6px); }
  66% { transform: rotate(-.3deg) translate(-.6px, .5px); }
}
@keyframes zfPfCursor {
  0% { opacity: 0; transform: translate(74px, 58px) rotate(8deg); }
  8% { opacity: 1; }
  28% { opacity: 1; transform: translate(0, 0) rotate(0); }
  31% { transform: translate(0, 0) scale(.82); }
  35%, 54% { transform: translate(0, 0) scale(1); opacity: 1; }
  68%, 100% { opacity: 0; transform: translate(-46px, 64px) rotate(-6deg); }
}
@keyframes zfPfPickCell {
  0%, 30% { transform: scale(1); opacity: 0; }
  32% { transform: scale(.84); opacity: 1; }
  38% { transform: scale(1.16) rotate(-4deg); opacity: 1; }
  44%, 84% { transform: scale(1) rotate(0); opacity: 1; }
  92%, 100% { transform: scale(1); opacity: 0; }
}
@keyframes zfPfTick {
  0%, 36% { stroke-dashoffset: 1; opacity: 1; }
  46%, 82% { stroke-dashoffset: 0; opacity: 1; }
  88%, 100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes zfPfRipple {
  0%, 31% { opacity: 0; transform: scale(.9); }
  33% { opacity: .9; transform: scale(1); }
  48%, 100% { opacity: 0; transform: scale(2.1); }
}
@keyframes zfPfBit {
  0%, 32% { opacity: 0; transform: translate(0, 0) rotate(0) scale(.4); }
  35% { opacity: 1; }
  50% { opacity: 1; transform: translate(var(--pf-bx), var(--pf-by)) rotate(var(--pf-br)) scale(1); }
  60%, 100% { opacity: 0; transform: translate(calc(var(--pf-bx) * 1.15), calc(var(--pf-by) * 1.15 + 14px)) rotate(calc(var(--pf-br) * 2)) scale(.8); }
}
@keyframes zfPfBoing {
  0% { transform: none; }
  18% { transform: translateY(6px) scale(1.08, .88); }
  42% { transform: translateY(-34px) scale(.94, 1.06) rotate(-8deg); }
  62% { transform: translateY(-34px) rotate(352deg); }
  80% { transform: translateY(3px) scale(1.06, .92) rotate(360deg); }
  100% { transform: rotate(360deg); }
}
@keyframes zfPfUnderline {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
/* ---------- Reduced motion: one meaningful still frame ---------- */
@media (prefers-reduced-motion: reduce) {
  .zf-pf .zf-pf-doodle,
  .zf-pf .zf-pf-doodle *,
  .zf-pf .zf-pf-pick,
  .zf-pf .zf-pf-pick *,
  .zf-pf .zf-kicker::after,
  .zf-pf .zf-schools-mark,
  .zf-pf .zf-mascot-hero { animation: none !important; transition: none !important; translate: none !important; }
  .zf-pf .zf-pf-fill { opacity: 1; }
  .zf-pf .zf-pf-tick path { stroke-dashoffset: 0; }
  .zf-pf .zf-pf-cursor { transform: translate(6px, 6px); }
  .zf-pf .zf-pf-ring, .zf-pf .zf-pf-bits { display: none; }
  .zf-pf .zf-kicker::after { clip-path: none !important; }
  .zf-pf .zf-mascot-hero.zf-pf-poke { cursor: default; }
}
