/* REV JAMi-PROFILE-1.14 - soft touch pulse for interactive card surfaces
   Load this after profile.css and partner-logo-align.css.
   This file is intentionally additive so manual hero-logo CSS adjustments remain untouched. */

:root {
  --jami-pulse-cyan: rgba(72, 199, 194, 0.18);
  --jami-pulse-cyan-strong: rgba(72, 199, 194, 0.30);
  --jami-pulse-white: rgba(255, 255, 255, 0.045);
}

/* Unified breathing cue for tappable / card-like surfaces. */
.solve-layer,
.eco-tile,
.rail-card,
.stat-card,
.brand-card,
.contact-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  animation:
    jamiCardEdge 18s linear infinite,
    jamiTouchPulse 2.8s ease-in-out infinite !important;
  will-change: filter, box-shadow, transform;
}

/* Gentle light pass inside the card. It hints "tap me" without becoming noisy. */
.solve-layer::before,
.eco-tile::before,
.rail-card::before,
.stat-card::before,
.brand-card::before,
.contact-card::before {
  content: "" !important;
  position: absolute !important;
  inset: -45% -35% auto !important;
  height: 90% !important;
  display: block !important;
  pointer-events: none !important;
  z-index: 0 !important;
  opacity: 0.42 !important;
  background:
    radial-gradient(circle at 35% 45%, rgba(72,199,194,0.18), transparent 34%),
    radial-gradient(circle at 70% 35%, rgba(255,255,255,0.045), transparent 30%) !important;
  transform: translate3d(-8%, -8%, 0) scale(0.92) !important;
  animation: jamiInnerGlowDrift 5.8s ease-in-out infinite !important;
}

.solve-layer > *,
.eco-tile > *,
.rail-card > *,
.stat-card > *,
.brand-card > *,
.contact-card > * {
  position: relative;
  z-index: 1;
}

/* Stagger the breathing so the page feels alive, not synchronized. */
.solve-layer:nth-child(2),
.eco-tile:nth-child(2),
.rail-card:nth-child(2),
.stat-card:nth-child(2),
.brand-card:nth-child(2) { animation-delay: .22s, .22s !important; }

.solve-layer:nth-child(3),
.eco-tile:nth-child(3),
.rail-card:nth-child(3),
.stat-card:nth-child(3),
.brand-card:nth-child(3) { animation-delay: .44s, .44s !important; }

.eco-tile:nth-child(4) { animation-delay: .66s, .66s !important; }
.eco-tile:nth-child(5) { animation-delay: .88s, .88s !important; }
.eco-tile:nth-child(6) { animation-delay: 1.10s, 1.10s !important; }
.eco-tile:nth-child(7) { animation-delay: 1.32s, 1.32s !important; }
.eco-tile:nth-child(8) { animation-delay: 1.54s, 1.54s !important; }

@keyframes jamiTouchPulse {
  0%, 100% {
    filter: brightness(1);
    box-shadow:
      0 20px 68px rgba(0,0,0,0.36),
      0 0 0 1px rgba(72,199,194,0.07),
      0 0 22px rgba(72,199,194,0.055) !important;
  }
  50% {
    filter: brightness(1.052);
    box-shadow:
      0 25px 78px rgba(0,0,0,0.46),
      0 0 0 1px rgba(72,199,194,0.18),
      0 0 38px rgba(72,199,194,0.16),
      0 0 12px rgba(255,255,255,0.035) !important;
  }
}

@keyframes jamiInnerGlowDrift {
  0%, 100% {
    opacity: 0.32;
    transform: translate3d(-10%, -10%, 0) scale(0.92);
  }
  50% {
    opacity: 0.58;
    transform: translate3d(8%, 4%, 0) scale(1.04);
  }
}

/* Active / hover state: slightly more assertive, still premium. */
.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,
.stat-card:hover,
.stat-card:focus-visible,
.brand-card:hover,
.brand-card:focus-visible,
.contact-card:hover,
.contact-card:focus-visible {
  transform: translateY(-3px) scale(1.008) !important;
  box-shadow:
    0 30px 92px rgba(0,0,0,0.52),
    0 0 0 1px rgba(72,199,194,0.24),
    0 0 50px rgba(72,199,194,0.22),
    0 0 18px rgba(255,255,255,0.045) !important;
}

/* Keep the modal itself neutral, but give it a restrained living shadow once open. */
.modal[aria-hidden="false"] .ecosystem-modal-panel {
  animation:
    moduleOpen 380ms cubic-bezier(.2,.82,.18,1) both,
    jamiModalSoftBreath 3.2s ease-in-out 420ms infinite !important;
}

.modal.is-closing .ecosystem-modal-panel {
  animation: moduleClose 220ms ease both !important;
}

@keyframes jamiModalSoftBreath {
  0%, 100% {
    box-shadow:
      0 34px 120px rgba(0,0,0,0.72),
      0 0 0 1px rgba(255,255,255,0.035),
      inset 0 1px 0 rgba(255,255,255,0.075) !important;
  }
  50% {
    box-shadow:
      0 40px 132px rgba(0,0,0,0.78),
      0 0 0 1px rgba(72,199,194,0.13),
      0 0 38px rgba(72,199,194,0.09),
      inset 0 1px 0 rgba(255,255,255,0.095) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .solve-layer,
  .eco-tile,
  .rail-card,
  .stat-card,
  .brand-card,
  .contact-card,
  .modal[aria-hidden="false"] .ecosystem-modal-panel,
  .solve-layer::before,
  .eco-tile::before,
  .rail-card::before,
  .stat-card::before,
  .brand-card::before,
  .contact-card::before {
    animation: none !important;
  }
}
