/* =====================================================================
   Geekly · moving elements (1.4.1, inc/motion.php + geekly/motion): ticker, strand with flowing text, tilted colour
   wall, floating spools. Decorative motion only; it pauses with the site's pause switch (html.paused) and is off for
   visitors who asked for reduced motion.
   ===================================================================== */
@keyframes gkTick{ from{ transform: translateX(0); } to{ transform: translateX(50%); } }
@keyframes gkSpinStud{ to{ transform: rotate(360deg); } }
@keyframes gkWallUp{ from{ transform: translateY(0); } to{ transform: translateY(-50%); } }
@keyframes gkWallDown{ from{ transform: translateY(-50%); } to{ transform: translateY(0); } }
@keyframes gkDrift{ 0%, 100%{ transform: translate(0, 0) rotate(-10deg); } 50%{ transform: translate(10px, -16px) rotate(4deg); } }
@keyframes gkFloat{ 0%, 100%{ transform: translateY(0) rotate(0deg); } 50%{ transform: translateY(-10px) rotate(-2.5deg); } }

/* the full-width bands use 100vw, which counts the scrollbar: clip the page sideways at the root so it never scrolls */
html:has(.gk-ticker, .gk-strand){ overflow-x: clip; }

/* the block wrapper adds nothing of its own */
.gk-motion-wrap{ margin-block-start: 28px; }
.gk-motion-wrap:has(> .gk-flyer){ position: static; block-size: 0; margin: 0; }

/* ---------- ticker: an ink band running across the page ---------- */
.gk-ticker{ position: relative; overflow: hidden; margin-block: 28px 0; inline-size: 100vw; max-inline-size: none !important; margin-inline: calc(50% - 50vw) !important; background: var(--ink); color: #fff;
  border-block: 2px solid var(--ink); }
.gk-motion-wrap > .gk-ticker{ margin-block: 0; }
.gk-tick-track{ display: flex; inline-size: max-content; gap: 28px; padding-block: 12px; white-space: nowrap;
  font: 800 var(--wp--preset--font-size--l)/1.1 var(--wp--preset--font-family--display); animation: gkTick 48s linear infinite; }
.gk-tick-i{ display: inline-flex; align-items: center; gap: 28px; }
.gk-tick-stud{ flex: none; inline-size: 20px; block-size: 20px; border-radius: 50%; border: 2px solid #fff;
  background: radial-gradient(circle at 34% 32%, #fff 0 2.6px, var(--c) 3.6px); animation: gkSpinStud 6s linear infinite; }

/* ---------- strand: a turquoise filament with the materials flowing along it ---------- */
.gk-strand{ position: relative; overflow-x: clip; margin-block: 34px 0; inline-size: 100vw; max-inline-size: none !important; margin-inline: calc(50% - 50vw) !important; }
.gk-motion-wrap > .gk-strand{ margin-block: 0; }
.gk-strand-svg{ direction: ltr; display: block; inline-size: 100%; block-size: clamp(140px, 16.67vw, 320px); overflow: hidden; }   /* 1.4.13: the 1440×240 band at its own proportions */
/* 1.4.14: the strand floats. It takes no room (the plates keep the same gap as everywhere else on the page) and hovers
   over the middle of that gap: the wave's centre line (y 150 of 240) sits half a gap below the plate above. */
.gk-strand{ --gk-sh: clamp(140px, 16.67vw, 320px); --gk-gap: 24px; block-size: 0; margin-block: 0 !important; z-index: 4; pointer-events: none; }
.gk-strand > .gk-strand-svg{ position: absolute; inset-inline: 0; inset-block-start: calc(var(--gk-gap) / 2 - var(--gk-sh) * .625); block-size: var(--gk-sh); }
.gk-strand + *{ position: relative; z-index: 1; }
.gk-strand-t{ font: 800 18px var(--wp--preset--font-family--display); fill: var(--ink); letter-spacing: .02em; }   /* 30% smaller, like the strand */
.gk-ride{ filter: drop-shadow(-2px 4px 0 oklch(17% .02 260 / .14)); }

/* ---------- colour wall: tilted columns of product pictures sliding up and down ---------- */
.gk-wall{ position: relative; overflow: hidden; margin-block: 28px 0; block-size: clamp(440px, 42vw, 560px);
  background: var(--wp--preset--color--acc-yellow); border: 2px solid var(--ink); border-radius: var(--r-plate, 10px); box-shadow: -8px 8px 0 var(--ink); }
.gk-motion-wrap > .gk-wall{ margin-block: 0; }
.gk-wall-in{ position: absolute; inset: -200px -160px; display: flex; gap: 20px; justify-content: center; transform: rotate(-9deg); }
.gk-wall-c{ display: flex; flex-direction: column; gap: 20px; }
.gk-wall-c.is-up{ animation: gkWallUp 70s linear infinite; }
.gk-wall-c.is-down{ animation: gkWallDown 70s linear infinite; }
.gk-wall-t{ flex: none; display: grid; place-items: center; inline-size: clamp(108px, 11vw, 160px); aspect-ratio: 1; overflow: hidden;
  background: var(--t, var(--white)); border: 2px solid var(--ink); border-radius: 6px; box-shadow: -5px 5px 0 var(--ink); }
.gk-wall-t img{ inline-size: 82%; block-size: 82%; object-fit: contain; border-radius: 4px; background: #fff; box-shadow: 0 0 0 1.5px var(--ink); }
.gk-wall-card{ position: absolute; z-index: 2; inset-block-start: 50%; inset-inline-start: 50%; translate: 50% -50%;
  display: flex; flex-direction: column; align-items: center; gap: 10px; inline-size: max-content; max-inline-size: min(420px, 84%);
  padding: 26px 34px 30px; text-align: center; background: var(--white); color: var(--ink);
  border: 2px solid var(--ink); border-radius: 6px; box-shadow: -8px 8px 0 var(--ink); }
.gk-wall-card h2{ margin: 0; font: 800 var(--wp--preset--font-size--2-xl)/1.1 var(--wp--preset--font-family--display); }
.gk-wall-card p{ margin: 0; font-size: var(--wp--preset--font-size--m); }
.gk-wall-card .btn{ margin-block-start: 6px; }
.gk-wall-bit{ position: absolute; inset-block-start: -104px; inset-inline-end: -46px; pointer-events: none; }
.gk-wall-bit .bit{ display: block; inline-size: 104px; block-size: auto; animation: gkFloat 4.6s ease-in-out infinite; filter: drop-shadow(-4px 6px 0 oklch(17% .02 260 / .14)); }

/* ---------- floating spools: snapped to a corner of their section, drifting ---------- */
.gk-fly{ position: absolute; z-index: 3; inline-size: clamp(64px, 8.5vw, 124px); block-size: auto; pointer-events: none;
  animation: gkDrift 9s ease-in-out infinite; animation-delay: var(--d, 0s); filter: drop-shadow(-5px 7px 0 oklch(17% .02 260 / .13)); }
.gk-fly-tl{ top: -46px; left: -18px; }
.gk-fly-tr{ top: -46px; right: -18px; }
.gk-fly-bl{ bottom: -42px; left: -14px; }
.gk-fly-br{ bottom: -42px; right: -14px; }
.gk-strand .gk-fly-tr{ top: -30px; right: 7%; }
.gk-strand .gk-fly-bl{ bottom: -20px; left: 12%; }

/* ---------- stop: the pause switch, reduced motion ---------- */
html.paused :is(.gk-anim, .gk-fly, .gk-tick-stud, .gk-wall-bit .bit){ animation-play-state: paused; }
@media (prefers-reduced-motion: reduce){
  :is(.gk-anim, .gk-fly, .gk-tick-stud, .gk-wall-bit .bit){ animation: none; }
}
@media (max-width: 760px){
  .gk-wall-in{ inset: -160px -220px; gap: 14px; }
  .gk-wall-c{ gap: 14px; }
  .gk-wall-card{ padding: 20px 22px 24px; }
  .gk-wall-bit{ inset-block-start: -84px; inset-inline-end: -14px; }
  .gk-wall-bit .bit{ inline-size: 84px; }
  .gk-tick-track{ font-size: var(--wp--preset--font-size--m); padding-block: 10px; }
  .gk-fly-tl, .gk-fly-bl{ left: 2px; }
  .gk-fly-tr, .gk-fly-br{ right: 2px; }
}

/* 1.7.15: the strand gets its own band in the page flow instead of lying over the sections above and below it
   (owner, 2026-11-09: "דורס את האלמנטים"). */
.gk-strand{ block-size: auto !important; margin-block: 6px !important; z-index: auto; }
.gk-strand > .gk-strand-svg{ position: relative; inset: auto; block-size: clamp(96px, 11vw, 190px); }
.gk-strand + *{ z-index: auto; }
/* 1.7.16: no floating spools on phones (they sat on the plates' corners) */
@media (max-width: 760px){ .gk-fly{ display: none; } .strand.tie{ display: none; } }
/* 1.7.17: the band height is the owner's (--gk-h, set on the section); smaller on narrow screens */
.gk-strand > .gk-strand-svg{ block-size: max(84px, calc(100vw * var(--gk-ar, .12))); }   /* the wave's own height; on phones at least 84px (the sides crop) */
.gk-strand-t{ font-size: inherit; }
