/* REV JAMi-PROFILE-1.19 - header text-only solution sweep + visible low-cost pulse support
   Loaded last. Keeps motion lightweight by animating only cards close to the viewport. */

:root {
  --jami-pulse-speed: 3.4s;
  --jami-header-sweep-speed: 10s;
  --jami-header-breath-speed: 12s;
}

/* Slower, less repaint-heavy top header animation. */
.site-top-profile {
  background:
    radial-gradient(circle at 88% 45%, rgba(72,199,194,0.075), transparent 10rem),
    linear-gradient(180deg, rgba(3,7,8,0.99), rgba(4,10,11,0.96)) !important;
}

/* REV 1.19: stop the obvious sweep across the entire menu bar.
   The solving glow now runs only across the header words. */
.site-top-profile::before,
.site-top-profile::after {
  opacity: 0 !important;
  animation: none !important;
  background: none !important;
}

.top-title {
  animation: jamiHeaderTitleGlowSlow var(--jami-header-breath-speed) ease-in-out infinite !important;
}

.menu-toggle::before {
  animation: jamiMenuHaloSlow 7.2s ease-in-out infinite !important;
}

@keyframes jamiHeaderSweepSlow {
  0%, 68% { transform: translateX(-132%); opacity: 0; }
  80% { opacity: .38; }
  100% { transform: translateX(132%); opacity: 0; }
}

@keyframes jamiHeaderLinePulseSlow {
  0%, 100% { opacity: .30; }
  50% { opacity: .68; }
}

@keyframes jamiHeaderTitleGlowSlow {
  0%, 100% { text-shadow: 0 0 10px rgba(72,199,194,0.14); }
  50% { text-shadow: 0 0 22px rgba(72,199,194,0.34); }
}

@keyframes jamiMenuHaloSlow {
  0%, 100% { opacity: .22; transform: scale(.86); }
  50% { opacity: .62; transform: scale(1.00); }
}

/* Cards: remove heavy conic/filter/pseudo effects from earlier files. */
.solve-layer,
.eco-tile,
.rail-card,
.stat-card,
.brand-card,
.contact-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(5,16,17,0.985), rgba(3,10,11,0.99)) !important;
  border: 1px solid rgba(72,199,194,0.12) !important;
  filter: none !important;
  will-change: auto !important;
  contain: layout paint;
  animation: none !important;
  transform: translateZ(0);
  transition:
    transform 220ms ease,
    border-color 320ms ease,
    box-shadow 320ms ease,
    background 320ms ease;
  box-shadow:
    0 20px 62px rgba(0,0,0,0.40),
    0 0 0 1px rgba(72,199,194,0.045),
    0 0 16px rgba(72,199,194,0.055) !important;
}

.solve-layer::before,
.eco-tile::before,
.rail-card::before,
.stat-card::before,
.brand-card::before,
.contact-card::before,
.solve-layer::after,
.eco-tile::after,
.rail-card::after,
.stat-card::after,
.brand-card::after,
.contact-card::after {
  content: none !important;
  display: none !important;
  animation: none !important;
  background: none !important;
  opacity: 0 !important;
}

/* Only cards near the viewport get the visible soft pulse. JS toggles .pulse-live. */
.solve-layer.pulse-live,
.eco-tile.pulse-live,
.rail-card.pulse-live,
.stat-card.pulse-live,
.brand-card.pulse-live,
.contact-card.pulse-live {
  animation: jamiVisibleSoftPulse var(--jami-pulse-speed) ease-in-out infinite !important;
}

@keyframes jamiVisibleSoftPulse {
  0%, 100% {
    border-color: rgba(72,199,194,0.13);
    box-shadow:
      0 20px 62px rgba(0,0,0,0.40),
      0 0 0 1px rgba(72,199,194,0.055),
      0 0 14px rgba(72,199,194,0.065) !important;
  }
  50% {
    border-color: rgba(72,199,194,0.38);
    box-shadow:
      0 24px 72px rgba(0,0,0,0.46),
      0 0 0 1px rgba(72,199,194,0.18),
      0 0 34px rgba(72,199,194,0.24),
      0 0 10px rgba(255,255,255,0.045) !important;
  }
}

/* Hover/focus remains tactile. */
.solve-layer:hover,
.solve-layer:focus-visible,
.solve-layer.is-active,
.eco-tile:hover,
.eco-tile:focus-visible,
.eco-tile.is-active,
.rail-card:hover,
.rail-card:focus-visible,
.rail-card.is-active,
.stat-card:hover,
.stat-card:focus-visible,
.brand-card:hover,
.brand-card:focus-visible,
.contact-card:hover,
.contact-card:focus-visible {
  transform: translateY(-2px) !important;
  border-color: rgba(72,199,194,0.44) !important;
  box-shadow:
    0 26px 78px rgba(0,0,0,0.50),
    0 0 0 1px rgba(72,199,194,0.22),
    0 0 38px rgba(72,199,194,0.24) !important;
}

/* Modal: neutral and accessibility-safe. */
.ecosystem-modal-panel {
  animation: none !important;
  box-shadow:
    0 42px 130px rgba(0,0,0,0.72),
    0 0 0 1px rgba(255,255,255,0.055),
    0 0 22px rgba(72,199,194,0.07) !important;
}

/* CTA pulse: visible, but cheaper than filters. */
.contact-card .button-primary {
  animation: jamiCtaBreathSlow 5.6s ease-in-out infinite !important;
}

@keyframes jamiCtaBreathSlow {
  0%, 100% {
    box-shadow: 0 14px 42px rgba(72,199,194,0.22);
  }
  50% {
    box-shadow: 0 18px 58px rgba(72,199,194,0.36);
  }
}

@media (max-width: 520px) {
  :root {
    --jami-pulse-speed: 3.8s;
    --jami-header-sweep-speed: 18s;
    --jami-header-breath-speed: 10s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-top-profile::before,
  .site-top-profile::after,
  .top-title,
  .menu-toggle::before,
  .solve-layer,
  .eco-tile,
  .rail-card,
  .stat-card,
  .brand-card,
  .contact-card,
  .contact-card .button-primary {
    animation: none !important;
  }
}




/* REV JAMi-PROFILE-1.19 - Header solution/code scramble treatment.
   Lightweight: only the small header words animate, in a short burst every 7-10 seconds. */
.top-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  isolation: isolate;
  overflow: visible;
}

.top-title .code-char {
  display: inline-block;
  transform: translate3d(0, 0, 0);
  transition: color 180ms ease, opacity 180ms ease, text-shadow 180ms ease, transform 180ms ease;
}

.top-title .code-space {
  display: inline-block;
  width: .42em;
}

/* Text-only light sweep. It does not cross the full sticky bar. */
.top-title::after {
  content: "";
  position: absolute;
  left: -10%;
  top: -28%;
  width: 42%;
  height: 156%;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  z-index: 2;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(179, 255, 231, 0.00) 12%,
    rgba(179, 255, 231, 0.16) 36%,
    rgba(83, 238, 230, 0.36) 50%,
    rgba(255, 255, 255, 0.18) 58%,
    rgba(83, 238, 230, 0.08) 78%,
    transparent 100%);
  filter: blur(9px);
  transform: translate3d(-135%, 0, 0) skewX(-14deg);
  mix-blend-mode: screen;
}

.top-title.is-solving-code::after {
  animation: jamiTextSolveSweep 1.9s cubic-bezier(.18,.78,.2,1) 1;
}

.top-title.is-solving-code {
  color: rgba(197, 255, 238, 0.98) !important;
  text-shadow:
    0 0 9px rgba(72, 199, 194, 0.28),
    0 0 16px rgba(72, 199, 194, 0.14) !important;
}

.top-title.is-solving-code .code-char:not(.code-space) {
  animation: jamiCodeMicroJitter 340ms steps(2, end) infinite;
}

.top-title .code-char.is-code-noise {
  color: rgba(255, 52, 155, 0.88);
  opacity: .90;
  text-shadow:
    0 0 8px rgba(255, 52, 155, 0.32),
    0 0 13px rgba(72, 199, 194, 0.14);
}

.top-title .code-char.is-code-lock {
  color: rgba(111, 255, 243, 1);
  text-shadow: 0 0 12px rgba(83, 238, 230, 0.32);
}

@keyframes jamiTextSolveSweep {
  0% { opacity: 0; transform: translate3d(-135%, 0, 0) skewX(-14deg); }
  12% { opacity: .36; }
  50% { opacity: .52; }
  88% { opacity: .30; }
  100% { opacity: 0; transform: translate3d(255%, 0, 0) skewX(-14deg); }
}

@keyframes jamiCodeMicroJitter {
  0%, 100% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(.38px, -.35px, 0); }
  50% { transform: translate3d(-.38px, .35px, 0); }
  75% { transform: translate3d(.26px, .26px, 0); }
}

@media (max-width: 520px) {
  .top-title::after {
    width: 46%;
    filter: blur(8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .top-title::after,
  .top-title.is-solving-code .code-char:not(.code-space) {
    animation: none !important;
  }
}
