/* motion.css: shared motion layer. Every rule here only applies when JS added its html class
   (js-reveal, js-fill) or a module started (is-running, is-playing), so without JS or with motion off
   the page looks exactly like the static version. */

/* ---- 1. reveal (js/modules/reveal.js): blur-up, one way only ---- */
html.js-reveal [data-reveal] {
  transition: opacity .9s var(--ease-out) var(--d, 0s), transform .9s var(--ease-out) var(--d, 0s), filter .9s var(--ease-out) var(--d, 0s);
}
html.js-reveal [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(24px); filter: blur(6px); }
html.a11y-no-motion [data-reveal] { opacity: 1 !important; transform: none !important; filter: none !important; }

/* ---- 2. outlined titles that fill right-to-left (js/modules/text-fill.js sets --p) ---- */
.fill-title { padding-block: .06em .2em; margin-block: -.06em -.2em; } /* room for ק / ף, no layout change */
html.js-fill .fill-title {
  --fill: var(--fill-color, var(--plum));
  color: transparent;
  -webkit-text-stroke: 1.2px color-mix(in srgb, var(--fill) 60%, transparent);
  background: linear-gradient(to left, var(--fill) var(--p, 0%), transparent var(--p, 0%));
  -webkit-background-clip: text; background-clip: text;
}

/* ---- 3. video layers: a planned loop sits over the photo and fades in only once it really plays ---- */
.media-layer {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .8s ease; pointer-events: none;
}
.media-layer.is-playing, .media-layer.is-poster { opacity: 1; }

/* ---- 4. endless rows (js/modules/marquee.js). RTL page: content travels to the right ---- */
@keyframes marquee { to { transform: translateX(50%); } }
.marquee {
  display: grid; gap: .8rem; overflow: hidden; margin-bottom: 2.6rem;
  -webkit-mask-image: linear-gradient(to left, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to left, transparent, #000 7%, #000 93%, transparent);
}
.marquee__track { display: flex; align-items: start; width: max-content; animation: marquee 70s linear infinite; }
.marquee__track--rev { animation-direction: reverse; animation-duration: 80s; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__bubble {
  flex: none; max-width: 21rem; margin-inline-end: .8rem; padding: .75rem 1.1rem;
  background: var(--white); border-radius: 20px 20px 20px 6px; font-size: .95rem; line-height: 1.55;
  box-shadow: 0 12px 26px -22px rgba(78, 58, 107, .55);
}
.marquee__track--rev .marquee__bubble { background: var(--lilac); border-radius: 20px 20px 6px 20px; }

/* ---- 5. section edges: rounded tops that overlap the section above, with a slow colour band ---- */
.section--lilac, .section--white, .build {
  --edge: clamp(28px, 5vw, 64px);
  position: relative; margin-top: calc(-1 * var(--edge));
  border-radius: var(--edge) var(--edge) 0 0;
}
.section--lilac::before, .section--white::before, .build::before {
  content: ""; position: absolute; top: 0; inset-inline: 22%; height: 4px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--brand), var(--plum), var(--brand), var(--plum));
  background-size: 300% 100%;
  animation: band-move 9s linear infinite;
}
@keyframes band-move { to { background-position: 300% 0; } }

/* ---- 6. no motion: everything stops where it is (widgets.css already kills animations) ---- */
html.a11y-no-motion .media-layer { transition: none; }
