/* ==========================================================================
   Motion layer (CSS half). Moves to the Kadence child theme unchanged.
   Every hidden-until-revealed state is scoped to html.od-motion, which is only
   set when JS runs and the visitor hasn't asked for reduced motion. Without it,
   all content renders in its final state.
   Simple fade-and-rise reveals on Kadence blocks are the block's own Animation
   setting (Fade Up); this file only shortens Kadence's travel to match.
   Hooks: .od-reveal (core blocks only)  .od-wipe  .od-reveal-lines  [data-od-split]  [data-od-dot]
          [data-od-marquee]  [data-od-map]  (scrubs live in motion.js)
   ========================================================================== */

/* --- Reveal ------------------------------------------------------------- */

.od-motion .od-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur-reveal) var(--ease-out), transform var(--dur-reveal) var(--ease-out);
}
.od-motion .od-reveal.is-in { opacity: 1; transform: none; }

/* Kadence block Animation "Fade Up" travels 100px; the house reveal rises 24px. */
[data-aos="fade-up"]:not(.aos-animate) { transform: translate3d(0, 24px, 0); }
/* Kadence hides animated blocks until its script runs; without JS they stay visible (html.od-js is set by
   an inline head script, so it is missing only when JS is off). */
html:not(.od-js) [data-aos] { opacity: 1 !important; transform: none !important; }

/* --- Wipe: media revealed top-down, settling from a slight zoom ----------- */

.od-motion .od-wipe {
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.85s var(--ease-out);
}
.od-motion .od-wipe > img,
.od-motion .od-wipe > .od-placeholder-media { scale: 1.12; transition: scale 1.2s var(--ease-out), transform 0.8s var(--ease-out); }
.od-motion .od-wipe.is-in { clip-path: inset(0 0 0 0); }
.od-motion .od-wipe.is-in > img,
.od-motion .od-wipe.is-in > .od-placeholder-media { scale: 1; }

/* --- Split headlines: words rise through a mask, line by line -------------- */

.od-motion [data-od-split] .od-w {
  display: inline-block;
  text-indent: 0; /* inline-blocks inherit text-indent; keep hanging-indent headings intact */
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.od-motion [data-od-split] .od-wi {
  display: inline-block;
  transform: translateY(105%);
  transition: transform var(--dur-reveal) var(--ease-out);
  transition-delay: calc(var(--od-line, 0) * 75ms);
}
.od-motion [data-od-split].is-in .od-wi { transform: none; }

/* The full stop lands after its line. */
.od-motion [data-od-split] .od-dot-mark {
  display: inline-block;
  opacity: 0;
  transform: translateY(-0.5em) scale(0.3);
  transition: opacity 0.25s, transform 0.4s var(--ease-drop);
  transition-delay: calc(var(--od-line, 0) * 75ms + 360ms);
}
.od-motion [data-od-split].is-in .od-dot-mark { opacity: 1; transform: none; }

/* --- Rotating word: data-od-rotate="team, vision, development" -------------
   The first word stays in the markup (and in the heading's accessible name);
   the others slide through in its place. */

span.od-rotate {
  display: inline-grid;
  text-indent: 0;
  vertical-align: top;
  overflow: hidden;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
  transition: width 0.3s var(--ease-out);
}
.od-rotate__word {
  grid-area: 1 / 1;
  justify-self: start;
  white-space: nowrap;
  transform: translateY(105%);
  transition: transform 0.3s var(--ease-out);
}
.od-rotate__word.is-current { transform: none; }
.od-rotate__word.is-leaving { transform: translateY(-105%); }
.od-rotate__word.is-reset { transition: none; }

/* --- Marquee ---------------------------------------------------------- */

.od-marquee.is-running .od-marquee__inner {
  display: flex;
  width: max-content;
  animation: od-marquee var(--od-marquee-dur, 45s) linear infinite;
}
.od-marquee.is-running .od-marquee__list {
  flex-wrap: nowrap;
  justify-content: flex-start;
  padding-inline: 0 var(--space-7);
}
.od-marquee.is-running:hover .od-marquee__inner,
.od-marquee.is-running:focus-within .od-marquee__inner { animation-play-state: paused; }

@keyframes od-marquee { to { transform: translateX(-50%); } }

/* --- Markets map --------------------------------------------------------- */

.od-motion [data-od-map] .od-map__corridor {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
}
.od-motion [data-od-map].is-in .od-map__corridor { stroke-dashoffset: 0; }

.od-motion [data-od-map] .od-map__place,
.od-motion [data-od-map] .od-map__region,
.od-motion [data-od-map] .od-map__corridor-label {
  opacity: 0;
  transition: opacity 0.5s var(--ease-out);
  transition-delay: calc(0.6s + var(--i, 0) * 0.1s);
}
.od-motion [data-od-map].is-in :is(.od-map__place, .od-map__region, .od-map__corridor-label) { opacity: 1; }

.od-motion [data-od-map].is-in .od-map__pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: od-pulse 2.8s var(--ease-out) 1.6s infinite;
}
@keyframes od-pulse {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(3.2); }
}

/* --- Line reveal: .od-reveal-lines (motion.js adds the line layer and .is-in) ------------
   Two brass lines draw across the middle, split up and down with the photo opening between
   them, and fade at the edges. The card's bottom gradient and tags follow the photo in. */
.od-reveal-lines { position: relative; }
.od-reveal-lines__lines { display: none; }
.od-motion .od-reveal-lines__lines { display: block; position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.od-motion .od-reveal-lines__lines::before,
.od-motion .od-reveal-lines__lines::after {
  content: ""; position: absolute; left: 0; right: 0; top: calc(50% - 1px); height: 2px;
  background: var(--palette1); transform: scaleX(0); transform-origin: left center;
  transition: transform 0.4s var(--ease-out), top 0.75s var(--ease-out) 0.35s, opacity 0.5s ease 1.3s;
}
.od-motion .od-reveal-lines.is-in .od-reveal-lines__lines::before { transform: scaleX(1); top: 0; opacity: 0; }
.od-motion .od-reveal-lines.is-in .od-reveal-lines__lines::after { transform: scaleX(1); top: calc(100% - 2px); opacity: 0; }
.od-motion .od-reveal-lines img { clip-path: inset(50% 0 50% 0); scale: 1.06; transition: clip-path 0.75s var(--ease-out) 0.35s, scale 1.2s var(--ease-out) 0.35s, transform 0.8s var(--ease-out); }
.od-motion .od-reveal-lines.is-in img { clip-path: inset(0 0 0 0); scale: 1; }
.od-motion .od-reveal-lines::after { opacity: 0; transition: opacity 0.5s ease 0.8s; }
.od-motion .od-reveal-lines.is-in::after { opacity: 1; }
.od-motion .od-project-card:has(.od-reveal-lines) .od-card__tags { transition: opacity 0.4s ease 0.9s; }
.od-motion .od-project-card:has(.od-reveal-lines:not(.is-in)) .od-card__tags { opacity: 0; transition: none; }
/* The hidden start state applies instantly (no fade into it when the page sets up). */
.od-motion .od-reveal-lines:not(.is-in)::after, .od-motion .od-reveal-lines:not(.is-in) img { transition: none; }

/* Integrated expertise hub: lines draw out from the ring, then the groups settle in, one by one. */
.od-motion .od-hub.is-ready .od-hub__lines path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.9s var(--ease-out); }
.od-motion .od-hub.is-ready .od-hub__lines circle { opacity: 0; transition: opacity 0.4s ease; }
.od-motion .od-hub.is-ready :is(.od-hub__title, .od-hub__list) { opacity: 0; transform: translateY(12px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.od-motion .od-hub.is-ready .od-hub__center > .kt-inside-inner-col { opacity: 0; transform: scale(0.94); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.od-motion .od-hub.is-in .od-hub__lines path { stroke-dashoffset: 0; }
.od-motion .od-hub.is-in .od-hub__lines circle,
.od-motion .od-hub.is-in :is(.od-hub__title, .od-hub__list) { opacity: 1; transform: none; }
.od-motion .od-hub.is-in .od-hub__center > .kt-inside-inner-col { opacity: 1; transform: none; }
