/* ============================================================
   RSB scroll performance
   Loaded last so it wins over the bundled stylesheets.
   ============================================================ */

/* Universal scroll-behavior:smooth animates every wheel tick and fights
   the inertial scroller, which reads as stutter. Anchor jumps opt in
   through scrollIntoView({behavior:'smooth'}) instead. */
html,
body {
  scroll-behavior: auto !important;
}

/* Apple product-tile: the hero recedes on scroll (JS writes the values).
   Origin at the top so it shrinks away from the sticky header. */
html:not([data-rsb-reduce]) .rsb-hero.rsb-apple-pin,
html:not([data-rsb-reduce]) .rsb-site .rsb-hero.rsb-apple-pin {
  transform-origin: center top;
  transform: scale(var(--rsb-pin-scale, 1)) !important;
  opacity: var(--rsb-pin-opacity, 1) !important;
}

/* overflow-x:hidden on body forces the other axis to auto and makes body
   the scrollport, so the page scrolls on a slow path. clip keeps the
   viewport as the scroller. */
html,
body {
  overflow-x: clip;
}

/* Hidden hero slides and the dismissed page loader keep animating otherwise. */
.rsb-hero__slide:not(.is-active),
.rsb-hero__slide:not(.is-active) *,
.rsb-hero__slide:not(.is-active) *::before,
.rsb-hero__slide:not(.is-active) *::after,
html:not(.rsb-loader-pending) .rsb-page-loader:not(.is-visible) *,
html:not(.rsb-loader-pending) .rsb-page-loader:not(.is-visible) *::before,
html:not(.rsb-loader-pending) .rsb-page-loader:not(.is-visible) *::after {
  animation-play-state: paused !important;
}

/* Repaint-heavy decorative loops (background-position shimmer, box-shadow
   pulses, @property gradients) hold while the page moves; they resume as
   soon as scrolling settles. Entrance animations are left running. */
html.rsb-scrolling .rsb-hero__particle,
html.rsb-scrolling .rsb-hero__title,
html.rsb-scrolling .rsb-hero__title-underline,
html.rsb-scrolling .rsb-hero__eyebrow,
html.rsb-scrolling .rsb-hero__eyebrow::before,
html.rsb-scrolling .rsb-hero__bg,
html.rsb-scrolling .rsb-shiny-btn,
html.rsb-scrolling .rsb-shiny-btn *,
html.rsb-scrolling .rsb-shiny-btn::before,
html.rsb-scrolling .rsb-shiny-btn::after,
html.rsb-scrolling .rsb3d-nav-fab,
html.rsb-scrolling .rsb-news-card-premium__new,
html.rsb-scrolling .rsb-news-nav,
html.rsb-scrolling .home-concept-news-image,
html.rsb-scrolling #rsbPwaBanner,
html.rsb-scrolling .rsb-expertise *,
html.rsb-scrolling .rsb-expertise::before,
html.rsb-scrolling .rsb-expertise::after,
html.rsb-scrolling .rsb-iran-map-3d *,
html.rsb-scrolling .rsb-related-services *,
html.rsb-scrolling .rsb-related-services::before,
html.rsb-scrolling .rsb-related-services::after,
html.rsb-scrolling .rsb-footer-modern,
html.rsb-scrolling .rsb-footer-modern *,
html.rsb-scrolling .rsb-footer-modern::before,
html.rsb-scrolling .rsb-footer-modern::after,
html.rsb-scrolling .rsb-footer-modern *::before,
html.rsb-scrolling .rsb-footer-modern *::after,
.rsb-perf-offscreen,
.rsb-perf-offscreen *,
.rsb-perf-offscreen::before,
.rsb-perf-offscreen::after,
.rsb-perf-offscreen *::before,
.rsb-perf-offscreen *::after {
  animation-play-state: paused !important;
}
/* The slide timer bar must stay in step with the autoplay timer. */
.rsb-hero .rsb-hero__progress-bar {
  animation-play-state: running !important;
}

/* These blurs are re-rasterised on every scroll frame. */
.rsb-footer-bottom,
.rsb-expertise-shell,
.rsb-hero__eyebrow,
.rsb-news-card-premium__meta-badge,
.rsb-news-nav,
.rsb-iran-map-3d__hint,
.rsb-iran-map-3d__status {
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
.rsb-expertise-shell {
  background: linear-gradient(135deg, rgba(18, 38, 66, .62), rgba(10, 26, 48, .5)) !important;
}
.rsb-hero__eyebrow { background-color: rgba(10, 20, 40, .38) !important; }

/* Soft entrance. Transform + opacity only, so layout does not shift.
   Later !important rules in the theme used to pin these at full opacity. */
/* Page arrival: the whole column settles up as the veil lifts. */
@keyframes rsb-apple-settle {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 1; transform: none; }
}
html:not([data-rsb-reduce]) .main.rsb-apple-settle {
  animation: none;
}
/* Leaving for another page: content eases away, the header stays. */
html:not([data-rsb-reduce]).rsb-page-leave .main {
  opacity: 0 !important;
  transform: translate3d(0, 12px, 0) scale(.985) !important;
  transition: opacity .26s cubic-bezier(.4, 0, 1, 1), transform .26s cubic-bezier(.4, 0, 1, 1) !important;
}

html:not([data-rsb-reduce]) .rsb-reveal,
html:not([data-rsb-reduce]) .rsb-reveal.rsb-reveal--armed,
html:not([data-rsb-reduce]) .rsb-reveal.rsb-reveal--visible {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
.rsb-scroll-top.rsb-visible {
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 10040 !important;
}
html:not([data-rsb-reduce]) .rsb-reveal[data-delay] { transition-delay: 0s !important; }

/* Homepage title rotator. Words swap by class only — no width measurement,
   so the old Porto plugin's outerWidth() reflow does not run. */
.rsb-rotator.slide span { display: inline-block; }
.rsb-rotator .word-rotator-words b {
  position: absolute;
  inset-inline-start: 0;
  white-space: nowrap;
  visibility: hidden;
}
.rsb-rotator .word-rotator-words b.is-visible {
  position: relative;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .rsb-reveal,
  .rsb-reveal.rsb-reveal--visible,
  .main.rsb-apple-settle {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}
