/* ============================================================================
   FieldSync — Scroll Animations ("scroll-fx.css")
   Pairs with scroll-fx.js. Defines the hidden->visible transition states for
   [data-reveal] elements, the parallax blob decoration, and a sticky panel
   utility used on the Services page credentials section.
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--rd, 0s);
  will-change: opacity, transform;
}
[data-reveal="fade-up"], [data-reveal=""] { transform: translateY(28px); }
[data-reveal="fade"] { transform: none; }
[data-reveal="zoom"] { transform: scale(.92); }
[data-reveal="left"] { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* ── Parallax decorative blobs ───────────────────────────────────────────── */
.svcParallaxBlob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.svcParallaxBlob.a { width: 42vw; height: 42vw; left: -10vw; top: 10%; background: radial-gradient(circle, rgba(124,58,237,.22) 0%, transparent 70%); }
.svcParallaxBlob.b { width: 36vw; height: 36vw; right: -8vw; bottom: -10%; background: radial-gradient(circle, rgba(56,189,248,.16) 0%, transparent 70%); }

/* ── Simple scroll-reveal story list (used by SmartRail roadmap, Relay
   copy is elsewhere, and the Athlete Display showcase). Each item is a
   visual + text pair that fades up into place when scrolled to - no
   pinning/sticky, no JS-driven step tracking. On narrow screens each
   item stacks visual-then-text, in document order, so nothing appears
   out of sequence. ── */
.svcStoryList {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.svcStoryItem {
  display: flex;
  align-items: center;
  gap: 44px;
}
.svcStoryItem:nth-child(even) { flex-direction: row-reverse; }
.svcStoryVisual {
  flex: 0 0 auto;
  width: min(440px, 46vw);
  display: flex;
  justify-content: center;
}
.svcStoryVisual > * { width: 100%; }
.svcStoryItemWide .svcStoryVisual { width: min(560px, 54vw); }
.svcStoryText {
  flex: 1 1 320px;
  min-width: 240px;
}
.svcAdStoryStepNum {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--accent, #7c3aed);
  margin-bottom: 10px;
}
.svcAdStoryStepTitle {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
}
.svcAdStoryStepDesc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 460px;
}

@media (max-width: 820px) {
  .svcStoryItem, .svcStoryItem:nth-child(even) { flex-direction: column; align-items: stretch; }
  .svcStoryVisual, .svcStoryItemWide .svcStoryVisual { width: 100%; max-width: 420px; margin: 0 auto; }
  .svcStoryList { gap: 22px; }
  .svcStoryText { margin-top: -4px; }
  .svcAdStoryStepDesc { margin-bottom: 0; }
}

/* ── Pinned scroll-story (device stays put, steps advance it) - used by the
   Relay/LoRa section only. [data-story-root] > sticky frame with screens
   ([data-story-screen="N"]) alongside a column of steps ([data-story-step]).
   Whichever step is nearest the pinned visual's own anchor point becomes
   active, and the matching screen crossfades in while the frame stays
   pinned in place. */
.svcAdStory {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin: 8px 0 44px;
}
.svcAdStorySticky {
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.svcAdStoryFrame {
  position: relative;
  width: 100%;
  max-width: 460px;
}
.svcAdStoryScreen {
  opacity: 0;
  transform: scale(.96) translateY(10px);
  transition: opacity .5s cubic-bezier(.22,.61,.36,1), transform .5s cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
.svcAdStoryScreen:not(:first-child) { position: absolute; inset: 0; }
.svcAdStoryScreen.is-active {
  opacity: 1;
  transform: scale(1) translateY(0);
  position: relative;
  pointer-events: auto;
  z-index: 1;
}
.svcAdStoryScreen.is-active ~ .svcAdStoryScreen.is-active { position: absolute; }
.svcAdStorySteps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.svcAdStoryStep {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: .55;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
}
.svcAdStoryStep:last-child { min-height: 50vh; }
.svcAdStoryStep.is-active { opacity: 1; transform: translateY(0); }

@media (max-width: 880px) {
  .svcAdStory { grid-template-columns: 1fr; gap: 20px; }
  .svcAdStorySticky { position: static; height: auto; margin-bottom: 8px; }
  .svcAdStoryFrame { display: flex; flex-direction: column; gap: 16px; max-width: 100%; }
  .svcAdStoryScreen, .svcAdStoryScreen:not(:first-child) { position: relative; inset: auto; opacity: 1; transform: none; }
  .svcAdStoryStep { min-height: 0; opacity: 1; transform: none; padding: 6px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .svcAdStoryScreen { transition: none !important; }
  .svcAdStoryStep { transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* ── Generic icon-based story visual card, reused by SmartRail roadmap ──── */
.svcInnoStoryCard {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  padding: 32px;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(124,58,237,.18) 0%, transparent 55%),
    linear-gradient(180deg, #12141c 0%, #0a0b10 100%);
  border: 1px solid rgba(148,163,184,.16);
  box-shadow: 0 14px 34px rgba(0,0,0,.35);
}
.svcInnoStoryIcon { font-size: 52px; line-height: 1; }
.svcInnoStoryStatus {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
}
.svcInnoStoryStatus.dev { color: #34d399; background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.3); }
.svcInnoStoryStatus.soon { color: #a78bfa; background: rgba(167,139,250,.12); border: 1px solid rgba(167,139,250,.3); }
.svcInnoStoryTitle { font-size: 19px; font-weight: 800; color: #f1f5f9; }

